[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: PLOT GRIDS ON INDICATOR



PureBytes Links

Trading Reference Links


Hi David,
 
You need to account for ranges in your IIFs as you never specified what happens if Trin < 0.60.
 
The code below should send you in the right direction:
 
//Trin Barometer// Val1 = Foreign("$Trin","c"); Plot( 100, "Ribbon",    IIf( Val1< 0.80, colorDarkGreen,    IIf( Val1>= 0.80 <FONT
 color=#000000>AND Val <= 0.95, colorBrightGreen,    IIf( Val1 > 0.95 AND Val1 <= 1.05, colorYellow ,    IIf( Val1 > 1.05 AND Val1 < 1.10, colorOrange, <FONT
 color=#000000>colorRed)))),    styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); 
Hope this Helps,
Gary
 
 
 
wooziwog <xcitemint@xxxxxxx> wrote:
I am new to AFL code and have failed at getting the following formula to work.  I am trying to create a ribbon that will change colors determined by the Trin reading.  I can get it to work with two colors but am having problems with multi colors.  I appreciate any help you can give.David K.//Trin Barometer//Val1 = Foreign("$Trin","c");Plot( 100, Ribbon", IIf( val1>.60, colorDarkGreen, IIf( Val1>.80, colorBrightGreen, IIf( Val1>.95, colorYellow , IIf(val1>1.05,colorOrange, IIf( Val1>1.10, colorRed, ) ) ) ) )) ,styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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 Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.


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








Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.