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.
-
-
02/21/2017 at 9:51 PM #2598402/22/2017 at 9:41 AM #2602012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788//-------------------------------------------------------------------------// Código principal : DAX 5 MIN TSL5(22)//-------------------------------------------------------------------------// Definición de los parámetros del códigoDEFPARAM CumulateOrders = false // Acumulación de posiciones desactivadaDEFPARAM FlatAfter =173000once ordersize=1if Ordersize>40 thenOrdersize=30endifHoraEntradaLimite = 090600HoraInicio = 090500HoraEntradaLimite1 = 091600HoraInicio1 = 091500HoraEntradaLimite2 = 093100HoraInicio2 = 093000if dayofweek=1 then //Mondaydaytrading=1endifif dayofweek=2 then // Tuesdaydaytrading=1endifif dayofweek=3 then // Wednesdaydaytrading=1endifif dayofweek=4 then //Thursdaydaytrading=1endifif dayofweek=5 then // Frifaydaytrading=1endifn=3if Time >= HoraInicio and time <= HoraEntradaLimite and daytrading= 1 or Time >= HoraInicio1 and time <= HoraEntradaLimite1 and daytrading= 1 or Time >= HoraInicio2 and time <= HoraEntradaLimite2 and daytrading= 1 thenc1 = open < close-2if not onmarket thenIF c1 THENIF PositionPerf(1) < 0 THENOrderSize = OrderSize/2if ordersize<1 thenordersize=1ENDIFELSIF PositionPerf(1) > 0 THENOrderSize =OrderSize+5if ordersize<1 thenordersize=1ENDIFendifbuy ordersize*n contract AT close+2 stopendifc2= open > close-1IF c2 THENiF PositionPerf(1) < 0 THENOrderSize = OrderSize/2if ordersize<1 thenordersize=1ENDIFELSIF PositionPerf(1) > 0 THENOrderSize =OrderSize+5if ordersize<1 thenordersize=1endifENDIFsellshort ordersize*n contract AT close-1 stopendifendifendifSET STOP ptrailing 5set target profit 1202/22/2017 at 9:42 AM #2602302/22/2017 at 9:47 AM #2602502/22/2017 at 7:33 PM #2607602/22/2017 at 8:00 PM #26080
@RAUL VG
Great job and very good results
I have some doubts about the functions of “set stop ptrailing” and “set target profit”.
First question, the “ptrailing” function overrides the “target profit” function.
Second, the “target profit” function pursues a target price while “target pprofit” seeks a profit determined by the movement of points.For those doubts and because the results in backtest with the “ptrailing” function are not reliable, this robot also I have had demo account since January 26 with very similar results.02/22/2017 at 8:01 PM #26083123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263//-------------------------------------------------------------------------// Código principal : DAX 5MIN TSL5 M v.2//-------------------------------------------------------------------------// Definición de los parámetros del códigoDEFPARAM CumulateOrders = false // Acumulación de posiciones desactivadaDEFPARAM FlatAfter =173000n=min(1000,(((Strategyprofit+5000)*0.03)/5))if n>100 thenn=100endifif n<10 thenn=10endifHoraEntradaLimite = 090600HoraInicio = 090500HoraEntradaLimite1 = 091600HoraInicio1 = 091500HoraEntradaLimite2 = 093100HoraInicio2 = 093000if dayofweek=1 then //Mondaydaytrading=1endifif dayofweek=2 then // Tuesdaydaytrading=1endifif dayofweek=3 then // Wednesdaydaytrading=1endifif dayofweek=4 then //Thursdaydaytrading=1endifif dayofweek=5 then // Frifaydaytrading=1endifif Time >= HoraInicio and time <= HoraEntradaLimite and daytrading= 1 or Time >= HoraInicio1 and time <= HoraEntradaLimite1 and daytrading= 1 or Time >= HoraInicio2 and time <= HoraEntradaLimite2 and daytrading= 1 thenc1 = open < close-2if not onmarket thenIF c1 THENbuy n contract AT close+2 stopendifc2= open > close-1IF c2 THENsellshort n contract AT close-1 stopendifendifendifSET STOP ptrailing 502/22/2017 at 8:56 PM #26087Hello jesus, ptrailing 5 function and take 12 use so that in case you go up 5 points and turn around, stay at 0. if you go up 10 and turn around, win 5, and I consider that rarely Rises more than 12 hit points without going back and so I put the take of 12.Let’s say that in order to “insure” you lose as little as possible in the event of a price increase.
hola jesus, la funcion ptrailing 5 y take 12 la uso para que en el caso de que suba 5 puntos y se de la vuelta, se quede a 0. si sube 10 y se da la vuelta, gane 5, y considero que rara vez sube mas de 12 puntos de golpe sin retroceder y por eso coloco el take de 12. Digamos que para “asegurar” perder lo minimo posible en el caso de retrocer el precio.
02/22/2017 at 8:59 PM #26088Hi ottimo, it is difficult to answer that question, keep in mind that the maximum number of orders are 120 x 5 points, and to reach that number of contracts, you must have won many times before. I will try to make the calculation and tell you. But I repeat that the backtest with trailing are not completely reliable
02/22/2017 at 9:12 PM #26089Thank you very much for your answer Raul. If I have not misunderstood you, if you use the “set stop ptrailing” function, but at the same time you want to set a limited benefit to certain points you must use the “set target profit” function instead of “set target pprofit”.
Muchas gracias por tu respuesta Raul. Si no te he entendido mal, si usas la función “set stop ptrailing”, pero a la vez quieres fijar un beneficio limitado a determinados puntos debes usar la función “set target profit” en vez de “set target pprofit”.
02/23/2017 at 5:00 PM #26184I tested the strategies with the dax 25 euros, 5 euros and 1euros.
Suprise, suprise.
The results are different and better on the dax to 1 euros.
Thank you if you can test at home.
I have no explanation.
IG says that the cfd dax are identical.
In addition, the 9:25 am schedule is better than 9:30.
Good continuation.
02/23/2017 at 8:16 PM #26223This is simply curve fitting, modifying the criteria to make it fit better. The reality is that implementing this will give greatly different results..
Particularly on a 5 min chart if it is automated, since the buy and sell only happens at the end of the timeframe in the test, whereas it happens in realtime in actual fact… and comes out completely different.
D
02/23/2017 at 9:31 PM #26229@ raul
if you have the time , i need some help here ….
https://www.prorealcode.com/topic/a-little-help-for-this-strategy-that-works-very-well/
1 user thanked author for this post.
02/28/2017 at 3:29 PM #2669002/28/2017 at 5:44 PM #26720 -
AuthorPosts
Find exclusive trading pro-tools on