// Downloaded From https://www.WiseStockTrader.com
P = Param("P",31,1,31,1);
Q =Param("Q",3,1,31,1);
TRI = TEMA(C,P);
DEL = Ref (DEMA ( L, Q),-1) ;
DEH=Ref (DEMA ( H, Q),-1) ;
Buy=Cross(TRI,DEL);
Sell=Cross(DEH,TRI);
Buy= ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=Sell;
Cover=Buy;
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
Plot(TRI,"   RSI Value ",6,styleThick);
Plot(DEH,"   RSI Value ",4,styleThick);
Plot(DEL,"   RSI Value ",5,styleThick);

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); 
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);