PureBytes Links
Trading Reference Links
|
Hi George,
I don't have the very old post you are referring to below. But the latest code I use for colorRSI is as follows. The second, third and forth statements make the different colours appear. I'm attaching a .GIF file to show how the colours appear.
rsi14 = RSI(14);colorArray = rsi14;colorArray = Iif(rsi14>=70,colorRed ,Iif(rsi14<=30,colorBrightGreen ,Iif(rsi14>=50,colorGreen ,colorBrown ) ) );Plot(rsi14,"",colorArray,styleLine);Plot(50,"",colorWhite,styleLine|styleNoLabel);Plot(30,"",colorBrightGreen,styleLine);Plot(70,"",colorRed,styleLine);
Title= "[RSI14 = " + WriteVal(rsi14,1.2) + "]"
+ Encodecolor(colorLightYellow) + "\n Disha: " + disha(rsi14,11) + "\nDigBheda: " + digbheda(C,rsi14) + Encodecolor(colorYellow)
+ " DigBheadaTula: " + WriteVal(digBhedaTula,1);
GraphXSpace=3;
Regards,
- Salil V Gangal
George Loyd <grloyd@xxxxxxxxx> wrote:
Salil,I have spent a couple of hours trying to make your 30/70 "colored bar" codeRSI+Stoch indicator work for the DeMark Range Expansion Indicator Tomaszpresented in Newsletter Issue 2/2000. I can't make it work. I havesuccessfully made it work for a couple other indicators. Could you help?Here is Tomasz' code:/*** Tom DeMark's Range Expansion Index** AFL Implementation by Tomasz Janeczko*/HighMom = H - Ref( H, -2 );LowMom = L - Ref( L, -2 );Cond1 = ( H >= Ref( L,-5) OR H >= Ref( L, -6 ) );Cond2 = ( Ref( H, -2 ) >= Ref( C, -7 ) OR Ref( H, -2 ) >= Ref( C, -8 ) );Cond3 = ( L <= Ref( H, -5 ) OR L <= Ref( H, -6) );Cond4 = ( Ref( L, -2 ) <= Ref( C, -7 ) OR Ref( L, -2 ) <= Ref( C, -8 ) );Cond = ( Cond1 OR Cond2 ) AND ( Cond3 OR Cond4 );Num = IIf( Cond, HighMom + LowMom, 0 );Den = abs( HighMom ) + abs( LowMom );TDREI = 100 * Sum( Num, 5 )/Sum( Den, 5 ) ;Graph0 = TDREI;========================================Here is what I did. It charts "blue" bars above +45 but NOT "red" bars below-45 ???[I used the code above except commented out the the "Graph0 = TDREI" line]//Graph0 = TDREI;Plot(TDREI,"",1,8);ColorArray=IIf(TDREI>-45,-45,TDREI);Plot(ColorArray,"",0,3);Plot(-45,"",4,2);Plot(45,"",0,2);Plot(TDREI,"TDREI",6,2);Plot(45,"",1,1);Plot(-45,"",1,1);Thanks for any help you might be able to give me,George Loyd----- Original Message -----From: "Salil V Gangal" To: Sent: Monday, July 29, 2002 10:48 PMSubject: Re: [amibroker] Coloured Bars> Hi HB,>> Actually Red bars will look better for smaller values for RSI+Stoch andBlue for> higher values. (I switched to XP and the chart looks even better !*smile*)>> I've attached the new screen-shot that shows how to make RSI+Stoch do thebars in> different colors. I modified horizontal lines to 25 and 75 ...>> Regards,>> - Salil V Gangal>>> --- HB wrote:> > Hello Salil,> >> > For the S&P chart and the bottom-most indicator (StochRSI ?), how do youget AB to> > fill in colored bars for when the indicator is below 30 (blue) or above70 (red)?> >> > Very fascinating as I didn't know this can be done !> >> > Thanks,> > HB> >> > > < < <>--------------------------------------------------------------------------------Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
Yahoo! Groups Sponsor
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 the Yahoo! Terms of Service.
Attachment:
Description: ""
|