I came across this in someone else’s strategy and, apart from it being an exit code, I don’t entirely understand what it’s doing.
Most grateful for an explanation in plain language.
IF LONGONMARKET AND summation[35](close < close[6]) = 35 THEN
SELL AT MARKET
ENDIF
Hi,
It checks to be true that close was lower than close[6] during each of the last 35 occurences, it saves you from writing the much longer equivalent condition “close<close[6] and close[1]<close[7] and close[2]<close[8] and … and close[34]<close[40]”
Alright, so it’s basically defining the length of a down trend and at what point it will quit.
Could be useful, thanks for the explanation.