Hellow,
Wants help to plot buy sell arrows on the RSI curve. Now they are coming on RSI 50 line. How to the following AFL to get arrows on RSI curve. Aprreciate your hlep.
_SECTION_BEGIN("RSI");
//SetChartOptions(0,0,chartGrid20|chartGrid50|chartGrid80);
periods = Param( "Periods", 14, 1, 200, 1 );
maxClip = Param( "maxClip", 70, 1, 100, 1 );
minClip = Param( "minClip", 30, 1, 100, 1 );
Plot( 50, _DEFAULT_NAME(), colorBlack , styleDashed|styleNoTitle|styleNoLabel );
Plot( 70, _DEFAULT_NAME(), colorBlack , styleLine|styleNoTitle|styleNoLabel );
Plot( 30, _DEFAULT_NAME(),colorBlack , styleLine|styleNoTitle|styleNoLabel );
r = RSI(periods);
RSI_col= IIf ( r>=50, colorBlue, IIf ( r<50,colorred, colorBlack));
Plot( RSI( periods), _DEFAULT_NAME(), RSI_col,styleThick, 0,0,0,2,2);
_SECTION_BEGIN("Buy Sell Arrows");
shapesSignalswitch = ParamToggle("Cross Signal Arrows","On,Off");
UPcolor = ParamColor( "UP Color", colorBlue );
DOWNcolor = ParamColor( "Down Color", colordarkRed );
Buy= RSI(14) > 70 ;
Sell= RSI(14) < 30 ;
PlotShapes(IIf(Buy,shapehollowUpArrow,shapeNone),colorBlue,0 );
PlotShapes(IIf(Sell,shapehollowDownArrow,shapeNone),colorRed,0 );
Buy1= RSI(14) > 30 AND Ref( RSI( 14), -1 ) < 30;;
sell1= RSI(14) < 70 AND Ref( RSI( 14), -1 ) > 70;;
PlotShapes(IIf(Buy1,shapeUpArrow,shapeNone),colorBlue,0 );
PlotShapes(IIf(Sell1,shapeDownArrow,shapeNone),colorRed,0 );
_SECTION_END();
r = RSI(periods);
PlotOHLC( r,r,50,r, "", IIf( r > 50, colorBrightGreen, colordarkRed), styleCloud | styleNoLabel | styleClipMinMax, minClip, maxClip );
RSIStatus =
WriteIf (RSI(14) > 70 , " Over Bought",
WriteIf (RSI(14) < 30 , " Over Sold"," "));
RSIColor=
WriteIf ( RSI(14) > 70, EncodeColor(colorBlue),
WriteIf ( RSI(14) < 30, EncodeColor(colordarkRed),
EncodeColor(colorBlack) ));
_SECTION_END();
Title = EncodeColor(colorBlack) +"RSI Check for Over Bought Sold "
+" "
- EncodeColor(colorWhite) + "{{INTERVAL}} "
//+" "
//+" " - EncodeColor(colorBlack)+ " RSI "
- WriteIf(RSI(14) >= 50,EncodeColor(colorBlue),
WriteIf(RSI(14) < 50,EncodeColor(colordarkRed)," ")) + WriteVal(RSI(14),format=1.2) - EncodeColor(colorBlack) + " " + RSIcolor + RSIStatus
;