I have the pleasure of sharing with you the Dax version of the Universal XBody Strategy (which you can find here), with the parameters optimized for this market.
Happy Trading!
//-------------------------------------------------------------------------
defparam cumulateorders=false
//------------------ SYSTEM VARIABLES---------------------------------------
//DAX40 Values: -------------------------------------------- Ottimization info
period=84// Optimize best value for each Symbol, range=1-1000, with step=1
mode=1// Optimize the best trading mode , range=1-4, with step=1
invertsignal=1// 1=positive signal, -1=negative signal, range=-1/1, with step=2
//***********************************************************************************************
//------------------ SYSTEM FILTER---------------------------------------
filter1=81// to set after the variable optimization, range=1-100, with step=1
filter2=6// to set after the variable optimization, range=1-100, with step=1
//------------------ INDICATOR ---------------------------------------
n = 1 //contracts quantity
body=close-open
var=(body-body[1])
sumvar=summation[period](var)
if sumvar>filter1*pipsize then
green=(sumvar)
endif
if sumvar<-filter2*pipsize then
red=(sumvar)
endif
if mode=1 then
c1=red<red[1]
c2=green>green[1]
endif
if mode=2 then
c1=red>red[1]
c2=green<green[1]
endif
if mode=3 then
c1=red<red[1]
c2=green<green[1]
endif
if mode=4 then
c1=red>red[1]
c2=green>green[1]
endif
if c1 then
signal=1*invertsignal
elsif c2 then
signal=-1*invertsignal
endif
// Conditions for entering long positions and exit short positions
IF signal>0 then
BUY n contract AT market
ENDIF
// Conditions for entering short positions and exit long positions
IF signal<0 THEN
SELLSHORT n CONTRACTs AT market
ENDIF
Good day davidelaferla, Thank you for making your strategy available to the community, I don't think it's a given! Your strategy performs really well until July 12, 2023 (similar to your graph), but then it goes steadily from €40,000 downwards to €18,000 in my backtest. For you, however, the graph continues to run up. Did you set the variables and filters as in the code you provided? If so, do you know what it could be instead? The time zone I set is UTC+2 (Europe/Berlin) I am also on the DAX 1 daily chart. I would be happy to receive feedback. Thank you in advance and best regards Bader