Traderji.com - Discussion forum for Stocks Commodities & Forex

AmiBroker formula Language

Discuss AmiBroker formula Language at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hello karthikmrar sir, I want to find highest high and lowest low values of previous ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Software > AmiBroker

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #151  
Old 17th November 2007, 09:55 AM
Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
SUBBU67 is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

Hello karthikmrar sir,
I want to find highest high and lowest low values of previous 20 days.for this i had written hhv function.But is showing all values from current date.But i want only highest high and lowestlow from past 20days.Can you help regarding this.
Reply With Quote
Sponsored Links
  #152  
Old 26th November 2007, 02:08 AM
Member
 
Join Date: Mar 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
mcsabee is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

hello,

The beta version of Amibroker (5.02.2) can be find the solution, to set the candle color independently,but still it heavy for me in this manner yet unfortunately to write the correct formula . More hours I spent an attempt but I could not write the right formula.
Only a step separates already from the solution.
I have to modify only one value simply that: IIf( (C > O)AND (C < Ref( C, -1)) colorwhite( show candle with red outline but white inside)

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
if (SetBarFillColor( IIf( (C < O) AND (C < Ref( C, -1)), colorRed, colorGreen ) ) );
else
(SetBarFillColor( IIf( (C > O)AND (C < Ref( C, -1)), colorWhite,colorWhite)));
Plot( C, "Close",IIf( Close < Ref( Close, -1), colorRed, colorGreen ), styleCandle );
_SECTION_END();
Do you know what is wrong in my afl coding?
Thank you your help…
Reply With Quote
  #153  
Old 6th December 2007, 03:42 PM
Member
 
Join Date: Oct 2006
Location: Cochin
Posts: 290
Thanks: 5
Thanked 0 Times in 0 Posts
kuriako will become famous soon enough
Reputation: 51
Smile Re: AmiBroker formula Language

Quote:
Originally Posted by beginner_av View Post
Dear Sir,
Please help me draw a vertical line from High to High + 20.
Dear BAV,

If your this question is not solved, here is a solution!

Please see attached AFL.

H20

Water!!!

Ref:-http://www.traderji.com/104429-post134.html
Attached Images
File Type: png h20 vertical line plotter.png (18.0 KB, 129 views)
Attached Files
File Type: txt H20.txt (75 Bytes, 80 views)

Last edited by kuriako; 6th December 2007 at 03:53 PM. Reason: added the post reference
Reply With Quote
  #154  
Old 6th December 2007, 07:55 PM
Member
 
Join Date: Sep 2005
Posts: 1,097
Blog Entries: 1
Thanks: 9
Thanked 29 Times in 18 Posts
beginner_av will become famous soon enoughbeginner_av will become famous soon enough
Reputation: 111
Default Re: AmiBroker formula Language

Quote:
Originally Posted by kuriako View Post
Dear BAV,

If your this question is not solved, here is a solution!

Please see attached AFL.

H20

Water!!!

Ref:-http://www.traderji.com/104429-post134.html
thank you sir, i was looking for a particular line above a particular bar, not using array. any solution for that?
Reply With Quote
  #155  
Old 6th December 2007, 08:56 PM
Member
 
Join Date: Oct 2006
Location: Cochin
Posts: 290
Thanks: 5
Thanked 0 Times in 0 Posts
kuriako will become famous soon enough
Reputation: 51
Smile Re: AmiBroker formula Language

unfortunately no position can be fixed without referring an array!

But we can try with barcount to locate the position you need to get!

And after getting that initial position using barcount, we can feed data to the new PlotOHLC array for the particular point! all others point till barcount can be set null!

I am not that that familiar with Ami, but will try my best for a solution!

I am trying to plot H20 if H-L>5.

I will post it here if i win.. else you can assume!!!

Was that "Sir" a sarcastic one!

Dont embrace me BAV...I am younger and much inexperienced than you...
Please call me kuriako

Last edited by kuriako; 6th December 2007 at 09:17 PM. Reason: made h-l>5
Reply With Quote
  #156  
Old 6th December 2007, 09:19 PM
Member
 
Join Date: Oct 2006
Location: Cochin
Posts: 290
Thanks: 5
Thanked 0 Times in 0 Posts
kuriako will become famous soon enough
Reputation: 51
Smile Re: AmiBroker formula Language

Here it goes BAV!
Attached Images
File Type: png h20 vertical line plotter(condition based).png (16.8 KB, 91 views)
Attached Files
File Type: txt h20when u need.txt (249 Bytes, 56 views)
Reply With Quote
  #157  
Old 6th December 2007, 11:02 PM
Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 226
Thanks: 0
Thanked 1 Time in 1 Post
newbee is on a distinguished road
Reputation: 36
Default Re: AmiBroker formula Language

Quote:
Originally Posted by kuriako View Post
Here it goes BAV!
Hello Kuri

Right click on the chart you get parameters, in the parameter window u get Axis and Grid tab, in that you have a choice to select Upper/Lower Limit - Yes/No

If you can get these values in your program, you should be able draw your vertical line, similar to the H2O lines.

Thanks
nb
___________________________________
TRADE WHAT YOU SEE, NOT WHAT YOU THINK
Reply With Quote
  #158  
Old 7th December 2007, 04:20 PM
Member
 
Join Date: Oct 2006
Location: Cochin
Posts: 290
Thanks: 5
Thanked 0 Times in 0 Posts
kuriako will become famous soon enough
Reputation: 51
Smile Re: AmiBroker formula Language

Quote:
Originally Posted by newbee View Post
Hello Kuri
...............
If you can get these values in your program, you should be able draw your vertical line, similar to the H2O lines.

Thanks
nb
But that are just MAX and MIN value of the current visible part of chart(inside window)!

We need to fix position of the bar where vertical line need to be drawn!

I didnt understand your point clearly!Sorry!
Reply With Quote
  #159  
Old 7th December 2007, 05:48 PM
Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 226
Thanks: 0
Thanked 1 Time in 1 Post
newbee is on a distinguished road
Reputation: 36
Default Re: AmiBroker formula Language

Quote:
Originally Posted by kuriako View Post
But that are just MAX and MIN value of the current visible part of chart(inside window)!

I didnt understand your point clearly!Sorry!
Its not your fault, its me.

Maybe I am giving you a route to hydrabad, when you need hydrabadi biryani !

I meant you should use the Max Min values of current visible part of the chart as high low of the bar, something similar to the H2O lines you have already drawn !!

To draw a line you need, 2 points and vertical line can be drawn as a single bar, instead of multiple ones you did with the above example.

Quote:
We need to fix position of the bar where vertical line need to be drawn!
Now thats the best one, you should be knowing which bar you want to draw a line for, right ! am sure you don't plan to draw random vertical lines

You would have some reasons to choose the bar, same reasons / logic should be used to place the line.

Maybe its still not clears, remember its me, not you who is .

Thanks
nb
___________________________________
TRADE WHAT YOU SEE, NOT WHAT YOU THINK
Reply With Quote
  #160  
Old 7th December 2007, 09:59 PM
Member
 
Join Date: Oct 2006
Location: Cochin
Posts: 290
Thanks: 5
Thanked 0 Times in 0 Posts
kuriako will become famous soon enough
Reputation: 51
Smile Re: AmiBroker formula Language

Scenario!

Naughty BAV (hope he is not reading this) want to draw a vertical line of "certain dimension" above a particular bar!

So for selecting a particular bar i used a mock condition (H-L>5)

For plotting a vertical bar we need two points!

Say (x,y1) and (x.y2)

X is time...

y1 for the scenario is taken as H and
y2 as H+20

As we both are newbies, we can chit chat more like this!
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads for: AmiBroker formula Language
Thread Thread Starter Forum Replies Last Post
need help on formula cmlee MetaStock 23 8th October 2007 07:55 PM
Metastock ,Metatrader & Amibroker indicator formula saji oommen MetaStock 0 4th June 2006 06:35 PM
Metastock language help Ropewalker MetaStock 4 1st November 2005 09:16 PM
TradeStation & MetaStock Formula Language bikertrader MetaStock 4 10th December 2004 01:50 PM


All times are GMT +5.5. The time now is 11:39 AM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com