.

Modified RSI Color Overbought Oversold Zone Line - Amibroker AFL Code

Click Image To Enlarge. Please Rate And Comment.

Modified RSI Color Overbought Oversold Zone Line

SetChartOptions(0,0,chartGrid20 |chartGrid50 |chartGrid80);
 _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} | Close=%g {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
 SetChartBkColor(ParamColor("Outer panel color ",colorBlack)); // color of outer border 
 SetChartBkGradientFill( ParamColor("Inner panel color upper half",colorBlack),
 ParamColor("Inner panel color lower half",colorDarkTeal)//color of inner panel
 ,ParamColor("behind Text Color", colorWhite));
// Title = EncodeColor(colorBlue)+ "Mod RSI" + " / " + Name() + " / " + EncodeColor(colorRed)+ Interval(2) + "/"+ EncodeColor(colorBlue) +
 "// / " + Date()   ;
 GraphXSpace=5;

 Hc=(O+H+L+C)/4;

 Ho = AMA( Ref( Hc, -1 ), 0.5 );

 pds = Optimize("pds ",Param("pds ",5,1,15,1),5,5,1);
 myArray = (RSI( pds )+ RSIa( Ho,pds ) + Ref(RSIa(Ho,pds),-3))/3 ; 
 Plot( myArray , " RSI ", IIf( myArray >Ref(myArray ,-1), colorBrightGreen, colorOrange ),styleThick);
 Plot(80,"",4, styleLine|styleLine | styleThick);
 Plot(50,"",colorBlue, styleLine|styleLine | styleThick);
 Plot(20,"",43, styleLine|styleLine| styleThick);
 Plot(0.00,"",colorWhite,styleLine,styleThick);
Previous Post Next Post