Hello all!,
I wrote this code making probes with the stochastic indicator:
Parameters are optimized for 5min EURUSD.
Results are got with 1.2 spread and 1000€.
My conclusion is the strategy could be positive but I think parameters are overfitted to get a good profit curve.
Feel free to comment, change, probe and improve the code!!
Andrés.
DEFPARAM CumulateOrders = False
//Parametros Estocastico
indEstocastico = Stochastic[14,3](close)
indMediaEstocastico = Average[5](Stochastic[14,3](close))
indMedia= ExponentialAverage[50000](close)
//Condiciones para posiciones cortas
valorEstacasticoMasBajo = lowest[NumeroVelasShort](Stochastic[14,3](close))
NumeroVelasShort = 4
NivelHigh= 87
DistanciaStopShort=60
DistanciaProfitShort=48
c1 = (valorEstacasticoMasBajo >= NivelHigh)
c2 = close < indMedia
c3 = (indEstocastico CROSSES UNDER indMediaEstocastico)
IF c1 AND c2 AND c3 THEN
SELLSHORT 1 CONTRACT AT MARKET
set stop loss DistanciaStopShort*pointsize
SET TARGET PROFIT DistanciaProfitShort*pointsize
ENDIF
//Condiciones para posiciones largass
valorEstacasticoMasAlto = Highest[NumeroVelasLong](Stochastic[14,3](close))
NumeroVelasLong = 6
NivelLow= 15
DistanciaStopLong=65
DistanciaProfitLong=35
c6 = (close >= indMedia)
c4 = (valorEstacasticoMasAlto <= NivelLow)
c5 = (indEstocastico CROSSES OVER indMediaEstocastico)
IF c6 AND c4 AND c5 THEN
BUY 1 CONTRACT AT MARKET
set stop loss DistanciaStopLong*pointsize
SET TARGET PROFIT DistanciaProfitLong*pointsize
ENDIF