Por mera casualidad y haciendo una prueva me dio un muy buen resultado un code en el que el takeprofit y el stoploss son unos valores muy pequeños respecto a las unidades del indice- DAX. Querria preguntar si esta simulacion en timeframe de 5 minutos es correcta o es simplemente un fallo de programa. El indice es el DAX mini 5 y el spread es 1,5 pip. gracias por adelantado.
DEFPARAM CumulateOrders = false
//programa
//money management
z=strategyprofit
if strategyprofit>1500 then
k=z/1500
n1=k*100
n2=k*30
endif
if strategyprofit< 1500 then
n1=100
n2=33
K=1
endif
//programa
once n= 0
if hour>08 and hour<22 then
if onmarket=0 then
preuact =close[0]
m480=average[10]
if n=24 then
n=0
endif
if high[1] - low[1] > 50 then
if preuact< m480 then
sellshort K lot AT MARKET
SET TARGET $PROFIT n1
set stop $loss n2
endif
endif
if low[1] - high[1] < -50 then
if preuact> m480 then
buy k lot AT MARKET
SET TARGET $PROFIT n1
set stop $loss n2
endif
endif
endif
endif
Hola Pablito,
Probé su estrategia y por desgracia muchas de las operaciones se abren y cierran en la misma barra.