PureBytes Links
Trading Reference Links
|
CS,
Thanks for your reply it really helped!
Brian
--- In amibroker@xxxxxxxxxxxxxxx, "CS" <res1wgwl@xxxx> wrote:
> Brian,
> Check the Users Guide for the syntax for WriteIf and Ref.
> I also noticed that there are times when nothing is written in the
TITLE line, for instance when MAADX is 19.6642. You will need to
adjust your conditions to capture that situation.
>
> Compare with yours:
>
> /*ADX Line with colors*/
> MAADX = Ref(ADX(14),-1);
> //Cond1 - Strong TREND
> Cond1 = (MAADX >= 30);
> //Cond2 - Weak TREND
> Cond2 = (MAADX >= 20) AND (MAADX <= 29);
> //cond3 - No Trend
> Cond3 = (MAADX >= 15) AND (MAADX <= 19);
> //Cond4 - Spring
> Cond4 = (MAADX < 15);
> Color =IIf(Cond1 ,colorGreen, IIf(Cond2 ,colorYellow, IIf
(Cond3,colorOrange,colorRed)));
> Plot(MAADX,"MAADX",Color,1);
> PlotGrid(15,0);
> Title = Name() + " ADX Trend Values: Yesterday = " + WriteVal
(MAADX,1.4) +
> EncodeColor( colorGreen )+WriteIf(Cond1," Strong TREND ","")+
> EncodeColor( colorYellow )+WriteIf(Cond2," Weak TREND ","")+
> EncodeColor( colorOrange )+WriteIf(Cond3," No Trend ","")+
> EncodeColor( colorRed )+WriteIf(Cond4," Spring ","");
>
> -CS
> ----- Original Message -----
> From: Brian
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Sunday, August 03, 2003 2:01 PM
> Subject: [amibroker] Question-ADX afl
>
>
> I am trying to use ADX(14) in a afl that will show color and
labels
> to indicate strength on trend. My goal was for the color of the
adx
> line to remain a continuum based on the parameters and the label
or
> header to show a current status of the trend. I keep getting
error
> messages on this formula can someone help me please.
>
> Brian
>
>
> /*ADX Line with colors*/
> MAADX = ADX(14);
>
> //Cond1 - Strong TREND
> Cond1 = (MAADX >= 30);
> //Cond2 - Weak TREND
> Cond2 = (MAADX >= 20)AND (MAADX <= 29);
> //cond3 - No Trend
> Cond3 = (MAADX >= 15) AND (MAADX <= 19);
> //Cond4 - Spring
> Cond4 = (MAADX < 15);
>
>
> Graph0 = MAADX;Graph0Style = 1;
> Graph0Color =IIf(Ref(Cond1) > 0 ,colorGreen) AND IIf(Ref(Cond2) >
> 0 ,colorYellow) AND IIf(Ref(Cond3) > 0 ,colorOrange) AND IIf(Ref
> (Cond4) > 0 ,colorRed);
>
>
>
> Title = Name() + " ADX Trend Values: Yesterday =" + WriteVal
(Ref
> (MAADX,-1)) +
> WriteIf(Cond1==1," Strong TREND ", WriteIf(Cond2==1," Weak
> TREND ", WriteIf(Cond3==1," No Trend ",WriteIf(Cond4==1,"
> Spring "))));
>
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|