Padhu,
Here is a crude version of what you asked
for. But i hope you'll find it easy to embellish.
Herbert:-
range = Prefs(
10 );
_N ( ranstr = "("+WriteVal( range, 1.0 )+")" );
vrsi = RSI(range);
RSICOLG= IIf(Vrsi<30,colorGreen,colorBlack);
RSICOLR= IIf(Vrsi>70,colorRed,colorBlack);
Plot (IIf(Vrsi<30,Vrsi,Null), "Histogram", RSICOLG, styleHistogram
);
Plot (IIf(Vrsi>70,Vrsi,Null), "Histogram", RSICOLR, styleHistogram
);
Plot (IIf(Vrsi<70
AND Vrsi>30,Vrsi,Null),"",colorBlack,styleHistogram);
Buy = Cross( vrsi,
30 );
Sell = Cross(
70, vrsi );
////////////////////////////////////
----- Original Message -----
Sent: Friday, April 01, 2005 8:23
AM
Subject: [amibroker] Plotting RSI
Histogram
Hello,
I am using the below code to plot RSI as a
histogram..But it plots only as a line...Basically when RSI is below 30 I
would like the histogram to be Green and if rsi is above 70 i would like the
histogram to be plotted Red. Appreciate if someone can share some thoughts on
this. Thanks.
Cheers,Padhu
//--Indicator-End-- -- do not remove this line
range = Prefs(
10
);
_N ( ranstr = "("+WriteVal( range, 1.0 )+")" );
Plot ( vrsi = RSI(range), "RSI" + ranstr, -8 );
RSI_Sell_Red= IIf(vrsi
< 50,
colorRed, colorGreen);
Plot ( vrsi, "Histogram", RSI_Sell_Red, 2 );
Buy = Cross( vrsi,
30 );
Sell = Cross(
70, vrsi
);
Please note that this group is for
discussion between users only.
To get support from AmiBroker please
send an e-mail directly to SUPPORT {at} amibroker.com
For other
support material please check also: http://www.amibroker.com/support.html
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
|