intraday DAX strategy 5min mini1€ spread 1
Forums › ProRealTime English forum › ProOrder support › intraday DAX strategy 5min mini1€ spread 1
- This topic has 502 replies, 34 voices, and was last updated 4 years ago by Asteriks.
-
-
01/20/2017 at 2:05 PM #21865
Took the last code from this post: https://www.prorealcode.com/topic/5-min-mini1e-dax-spread-1/page/3/#post-21815
Modified the code to be lightweight with only useful code, don’t know if it’s the last version, but this kind of coding should be used in your future development, to gain some time while backtesting:
12345678910111213141516171819202122232425262728293031323334353637383940414243// Definición de los parámetros del códigoDEFPARAM CumulateOrders = false // Acumulación de posiciones desactivadaDEFPARAM FlatAfter = 173000once ordersize=1HoraEntradaLimite = 090600HoraInicio = 090500Margin = 60Lottfree = 0orderSize = max(1,1+ROUND((strategyprofit-lottfree)/Margin))ordersize=min(18,ordersize)n=1if Time >= HoraInicio and time <= HoraEntradaLimite thenif not onmarket thenc1 = open < close-2*pointsizec2= open > close-1*pointsizeIF PositionPerf(1) < 0 THENOrderSize = OrderSize/2ELSIF PositionPerf(1)> 0 THENOrderSize =OrderSize+2endifordersize=max(ordersize,1)IF c1 THENbuy ordersize*n contract AT close+2 stopendifIF c2 THENsellshort ordersize*n contract AT close-1 stopendifendifendifSET STOP ptrailing 501/20/2017 at 3:14 PM #2187501/20/2017 at 3:34 PM #2187701/20/2017 at 3:45 PM #21878@Alco. That sounds better. I’ll try getting the data. I actually trade the Dow anyway (I’m currently trading through X_Trader and chart through eSignal). The equivalent contract on PRT to what I trade is the Mini DJ30 Full0317 Future. Hopefully this is similar to the prices you get.
I’ll let you know how it goes.
01/20/2017 at 4:12 PM #2188101/20/2017 at 4:16 PM #2188201/20/2017 at 7:34 PM #21900Hello guys,
First of all, Grandisimo trabajo Raul,
Next…
This is only an idea, I tried the strategy in 15 minutes timeframe, only changing some data (attach shot3). I have compared the both timeframe in the last year (small backtest) and the results were sightly diferent.
I changed the code to start both system with only one contract for really small accounts (sadly my case)
As you can see, the drawdown is very similar but gains not
So, what’s your opinion
HappyTrading
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162// Definición de los parámetros del códigoDEFPARAM CumulateOrders = false // Acumulación de posiciones desactivadaDEFPARAM FlatAfter =173000once ordersize=1HoraEntradaLimite = 091600HoraInicio = 091500Margin = 60Lottfree = 0orderSize = max(1,1+ROUND((strategyprofit-lottfree)/Margin))if Ordersize>18 thenOrdersize=180endifn=1if Time >= HoraInicio and time <= HoraEntradaLimite thenc1 = open < close-2if not onmarket thenIF c1 THENIF PositionPerf(1) < 0 THENOrderSize = OrderSize/2//+1if ordersize<1 thenordersize=1ENDIFELSIF PositionPerf(1) > 0 THENOrderSize =OrderSize+2if ordersize<1 thenordersize=1ENDIFendifbuy ordersize*n contract AT close+2 stopendifc2= open > close-1IF c2 THENiF PositionPerf(1) < 0 THENOrderSize = OrderSize/2//+1if ordersize<1 thenordersize=1ENDIFELSIF PositionPerf(1) > 0 THENOrderSize =OrderSize+2if ordersize<1 thenordersize=1endifENDIFsellshort ordersize*n contract AT close-1 stopendifendifendifSET STOP ptrailing 501/20/2017 at 7:37 PM #2190901/20/2017 at 7:42 PM #21910Hi Carlos, thank you very much, I see in your backtest a benefits curve that is not very attractive and an excessive max drawdown, for example, for the last robot that I have shared the max drawdown is half and profits more than double
01/20/2017 at 7:43 PM #2191101/20/2017 at 7:51 PM #21912Thanks for the comment, what capital do you think is the best to start in live account. I would like to get code to start with 2000€ of capital and trying to asuming a real risk
Saludos de Madrid.
01/20/2017 at 8:34 PM #21918Raul – here you go. Your previous code exactly as it was with a trailing stop of 5. Problem seems to be with the data around end June & July 2014. The backtest here is from 1 Aug 2014 until 30 Dec 2016.
Have a good weekend guys. Catch you Monday
01/20/2017 at 8:34 PM #21921With the same strategy you are waiting 3 times longer (3 bars of 5 minutes in a 15 minutes timeframe) to place and move stoploss with the trailing stop. As you may already know it, nothing happens between 2 bars in probacktest.
01/20/2017 at 8:59 PM #21922Hi jonjon, Many thanks for your time and for helping me, there is one thing that bothers me, and is that in my backtest of a year and a half earns 33,000euros, and in yours 2 and a half years with a very good profit curve earns 600,000 / 25 = 24,000 euros. I do not understand how it can be so
01/21/2017 at 12:20 AM #21929Hi,
at this time, for me, the best code is this. I have modified the code posted from nicolas in relation to position size leaving only my position size and optimizing the best position trade in max 38 lots. Thanks
12345678910111213141516171819202122232425262728293031323334353637383940// Definición de los parámetros del códigoDEFPARAM CumulateOrders = false // Acumulación de posiciones desactivada// La posición se cierra a las 17:29 p.m. si no toca ni stop ni take.DEFPARAM FlatAfter =173000once ordersize=1HoraEntradaLimite = 090600HoraInicio = 090500Margin = 60Lottfree = 0orderSize = max(1,1+ROUND((strategyprofit-lottfree)/Margin))ordersize=min(38,ordersize)n=1if Time >= HoraInicio and time <= HoraEntradaLimite thenif not onmarket thenc1 = open < close-2*pointsizec2= open > close-1*pointsizeIF c1 THENbuy ordersize*n contract AT close+2 stopendifIF c2 THENsellshort ordersize*n contract AT close-1 stopendifendifendifSET STOP ptrailing 5Thanks
-
AuthorPosts
Find exclusive trading pro-tools on