// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN("EMA Time Frame");
r= RSI(21);
Plot(r,"",colorBlue,styleDots);
Plot(30 , "", colorDarkRed); 
Plot(50, "", colorWhite,styleDashed);
Plot(70, "", colorDarkRed);
_SECTION_END();

Plot(TSF(r,50),"",colorRed,styleThick);

Buy=Cross(r,TSF(r,50))OR r<(20);
Sell=Cross(TSF(r,50),r)OR r>=(80);
SELL2 =Cross(50,R) ;
PlotShapes(IIf(Buy,Buy*1,shapeNone),colorBrightGreen,0,r,-15); 
PlotShapes(IIf(Sell,Sell*2,shapeNone),colorRed,0,r,-15);
PlotShapes(IIf(Sell2,shapeDownArrow,shapeNone),colorDarkRed,0,r,-15);

PlotOHLC(20,20,30,30,"",ColorRGB(0,175,0),styleCloud+styleLine);
PlotOHLC(70,70,80,80,"",ColorRGB(0,175,0),styleCloud+styleLine,colorRed);