Hello, I have been using this automated system for over a year, with a couple of changes but overall useful and profitable on the DAX. It enters at Frankfurt market opening.
I want to share this with the community as I have been benefited too from the knowledge and good systems shared on the page.
Please feel free to test it and any improvements are very welcome.
N parameter can be used with 1.5 to 5.5
Also if anyone can perform the 200000 bar test as well, please do it so and share the results.
Many thanks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
//ALPHA - Autor: David Somogyi // Definición de los parámetros del código DEFPARAM CumulateOrders = False // Acumulación de posiciones desactivada // El sistema anulará todas las órdenes pendientes y cerrará todas las posiciones a las 0:00. No se permitirá ninguna nueva orden ni posición después de la hora "FLATBEFORE". DEFPARAM FLATBEFORE = 090000 // Anular todas las órdenes pendientes y cerrar todas las posiciones a la hora "FLATAFTER" DEFPARAM FLATAFTER = 140000 // Dias de la semana IF DayOfWeek = 0 OR Dayofweek = 6 THEN tradeok = 0 ELSE tradeok = 1 endif // Impide al sistema crear nuevas órdenes para entrar al mercado a aumentar el tamaño de la posición antes de una hora precisa timeEnterBefore = time = 090000 timeEnterAfter = time <= 093000 //FDI (fractal dimension index) de 1.5 // //N = 1.5 once fdi=undefined if barindex >= n-1 then diff=0 length = 0 pdiff = 0 hh=0 ll=0 FDI=0 HH = highest[N](close) LL = lowest[N](close) for Period = 1 to N-1 do if (HH - LL) > 0 then diff = (customclose[Period] - LL) / (HH - LL) if Period > 1 then length = length + SQRT(SQUARE(diff - pdiff) + (1 / SQUARE(N))) endif pdiff = diff endif next if length > 0 then FDI = 1 + (LOG(length) + LOG(2)) / LOG(2 * (N)) else FDI = 0 endif //First trade whatever conditions // Condiciones para entrada de posiciones largas MSLOW = ExponentialAverage[1](Momentum[2](close)) c1 = (Momentum[2] > MSLOW[1]) //Impulse = ROC[12](close)>0 c2 = (Close > PSAR) PSAR = SAR[0.03,0.03,0.2] //PSARlongtrendstop = PSAR < PSAR[1] and PSAR[2] < PSAR[1] //Condiciones de entrada de posiciones cortas //c3 = (Momentum[2] < MSLOW[1]) //c4 = (Close < PSAR[1]) positionsize = 3 IF not onmarket and (c1 AND c2) AND timeEnterBefore and timeenterafter and FDI<1.55 and tradeok =1 THEN BUY positionsize CONTRACT AT MARKET ENDIF //IF not onmarket and (c3 AND c4) AND timeEnterBefore and timeenterafter and FDI<1.5 THEN //SELLSHORT positionsize CONTRACT AT MARKET // Condiciones de salida de posiciones largas //IF longonmarket and BARINDEX-TRADEPRICE = 10 THEN //sell at market //ENDIF //ENDIF // Stops y objetivos // //SET target profit 30 SET stop ploss 54 endif |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi, 200K backtest looks horrible, sorry. http://tinypic.com/r/20aaser/9
The author uses optimized N variable, validated with WF analysis. Everyone should do his homework with this one 😉
Im not sure what u mean Nicolas, maybe i have the wrong time-settings? Ive tried to optimize and tbh my optimizer window isa saying its the exact same results with N = 2-3.5 and almost same results for anything from 1.5 -> 5.5
am i missing something here? Results from 2016-2018 looks good but 2011 -> 2016 looks like crap.
Hopefully, David will explain his results and how he did proceed to get them.
Hello Nicolas, thanks for the support.
N variable can be optimized from 0 to 50 if you would like. Same for fdi parameter which is the fractal dimension index indicator that watches de volatility at market opening. This what Genetic optimization works for.
Momentum indicator as well. Like i’ve said, I have used this bot for a year and more and it has performed well. I have placed different stop losses and even a take profit can be set too.
I did not know about the 200k test, that is why I have asked for it. As Nicolas said, everyone can do their homework and maybe share some upgrades. This is a system with lots of potential IMO, so any improvement is very welcome.
Hi,
One year trades since Alpha running.
https://imgur.com/a/TCK4kJH
Hopefully it will continue working on the future.
Trade safe everyone
Thanks for the update David!
quelle parametre utilisé vous pour obtenir ces resultat ? merci
you still use tihs one David?