13 lines of code for the FTSE 100 index on the daily timeframe.
The code
defparam cumulateorders = false
entrycondition1 = low[1] < low[2] and low[1] < low[3] and low[1] < low[4] and low[1] < low[5] and low[1] < low[6]
entrycondition2 = close[0] < close[1] and (low[0] > low[1] or high[0] > high[1])
entrycondition3= close[0] < average[20]
IF entrycondition1 and entrycondition2 and entrycondition3 THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
If LongOnMarket AND close[0] > close[1]THEN
SELL AT MARKET
ENDIF