RSI Indicator With Middle 50 Line

RSI Indicator With Middle 50 Line
RSI Indicator With Middle 50 Line

//www.aflcode.com
_SECTION_BEGIN("RSI");
SetChartOptions(0,0,ChartGrid30|ChartGrid70,0,100);
periods = Param( "Periods", 14, 1, 200, 1 );
z = RSI( periods);
 
RSILineColor = ParamColor("RSI Line Color",ColorRGB(127,0,83));
RSIOverboughtColor = ParamColor("RSI Overbought Color",ColorRGB(127,0,83));
RSIOversoldColor = ParamColor("RSI Oversold Color",colorRed);
 
 
Plot( z, _DEFAULT_NAME(), RSILineColor , styleLine  );
Plot( 50, _DEFAULT_NAME(), RSILineColor , styleDashed|styleNoTitle  );
Plot( 70, _DEFAULT_NAME(), RSILineColor , styleLine|styleNoTitle  );
Plot( 30, _DEFAULT_NAME(), RSILineColor , styleLine|styleNoTitle  );
PlotOHLC(z,z,50,z,"",IIf(z>50,RSIOverboughtColor,RSIOversoldColor),styleCloud|styleClipMinMax,30,70);
 
 
_SECTION_END();
Previous
Next Post »