Buy = EMA(Close, 5) > MA (Close, 20) AND RSI (21) < 40 ;
Short = EMA(Close, 5) < MA (Close, 20) AND RSI (21) > 60 ;
Cover = RSI (21) > 80 ;
Sell = RSI (21) < 30 ;
Buy = ExRem(Buy, Short OR Sell) ;
Short = ExRem(Short, Buy OR Cover) ;
Cover = ExRem(Cover, Buy) ;
Sell = ExRem(Sell, Short) ;
PlotShapes(Cover*shapeUpArrow, colorBlack, 0, L, -12) ;
PlotShapes(Sell*shapeDownArrow, colorBlack, 0, H, -12) ;
PlotShapes(Buy*shapeUpArrow, colorBlue, 0, H, 12) ;
PlotShapes(Short*shapeDownArrow, colorRed, 0, L, 12) ;