Hi all,
Have a look to this daily strategy on S&P 500. I guess many of you already know it, as it is made very famous by Larry Connors, I just added a bit of asymmetry between long and short, but the code is still extremely light, with only 2 parameters optimized and a stable performance of over 20 year!
defparam cumulateorders = false
cl = RSI[2]<a
cs = RSI[2]>100-a
if cl then
buy 10 contracts at market
endif
if cs then
sellshort 10 contract at market
endif
if longonmarket and RSI[2]>100-(a+b) and close < open then
sell at market
endif
if shortonmarket and RSI[2]<(a+b) then
exitshort at market
endif