I am new to the AFL and still in the learning process. I watched Dave's online YouTube video on how to plot Apply Stop on a chart (https://www.youtube.com/watch?v=TaWlJ6X4Om4&t=302s). I was able to follow and plot the Apply Stop signals, however; when I used the same logic for the Short and Cover nothing got plotted. Please see the following code. I already spent a few hours and gave up on this. I would really appreciate your help.
//SetPositionSize(5, spsPercentOfEquity); SetOption("MaxOpenPositions", 2000); ShortTrade = Cross(70, RSI(14)); CoverTrade = Cross(RSI(14), 50); Stoplength = 4; Short = ShortTrade; Cover = CoverTrade; ApplyStop(stopTypeLoss,stopModePoint,Stoplength,1, False); Equity(1,0); inTrade = Flip(Short,Cover); SetOption ("EveryBarNullCheck", True); Stopline =IIf(inTrade, ValueWhen(Short,ShortPrice+Stoplength,1), Null); Plot (Stopline, "StopLine", colorRed, styleline,0,0,0,0); PlotShapes(IIf(Short, shapeUpArrow, shapeNone),colorRed, 0, L, Offset=-40); PlotShapes(IIf(Cover, shapestar, shapeNone),colorRed, 0, H, Offset=20);