Reversion Bars v2.0 GBPUSD
Forums › ProRealTime English forum › ProOrder support › Reversion Bars v2.0 GBPUSD
- This topic has 5 replies, 2 voices, and was last updated 7 years ago by
Nicolas.
-
-
07/19/2017 at 12:59 PM #41031
Hello all, this is the latest version of my reversion bars strategy on GBPUSD, it has been optimized and its running better, also i have backtested on 100000. If anyone want to kindly backtest this strategy on 200000 bars, be my guest and please share the results =D =D Thanks and good trading
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172defparam cumulateorders = falseMyEMA = ExponentialAverage[36](close)nbar = 4//Volatility Filter:////FDI (fractal dimension index)N = 33once fdi=undefinedif barindex >= n-1 thendiff=0length = 0pdiff = 0hh=0ll=0FDI=0HH = highest[N](close)LL = lowest[N](close)for Period = 1 to N-1 doif (HH - LL) > 0 thendiff = (customclose[Period] - LL) / (HH - LL)if Period > 1 thenlength = length + SQRT(SQUARE(diff - pdiff) + (1 / SQUARE(N)))endifpdiff = diffendifnextif length > 0 thenFDI = 1 + (LOG(length) + LOG(2)) / LOG(2 * (N))elseFDI = 0endifendifpositionsize = 1C4 = MyEMA CROSSES OVER CLOSEC3 = BARINDEX - TRADEINDEX = NBARC5 = close CROSSES UNDER MyEMA//Enter long positionsIF not longonmarket and open > close[1] and C4 and FDI<1.5 THENBUY positionsize LOT AT MARKET nextbaropenENDIF//Exit long positionsIf LongOnMarket AND C3 THENSELL AT MARKETendif//Enter short positionsIF NOT ShortOnMarket AND open < close[1] and C5 and FDI<1.5 THENSELLSHORT positionsize LOT AT MARKET nextbaropenENDIF// Exit short positionsIF ShortOnMarket AND C3 THENEXITSHORT AT MARKETendif//Stops//set stop $loss 6007/19/2017 at 1:05 PM #41072Hi David, thank you for your post into the library. I moved it here because I think you should first make a robustness test with the new WF tool.
As you can see in my attached pictures, I backtested the strategy with and without the tick mode. It is obviously overfitted and that’s why I think you should use the Walk Foward tool to see how and when the strategy should be re-optimized in order to be more confident about the way the strategy could perform in the future. You can read the Walk Forward FAQ in this blog article.
07/19/2017 at 3:23 PM #41087Thanks Nicolas,
I’ll put some more work on it and perform a non-anchored WF to the system. However, WF results not always have the last word when it comes to real performance.
Anyway, many thanks for your advice and i’ll post it again with better and reliable results.
Best Regards,
07/19/2017 at 4:53 PM #41091The WF analysis will tell you if the strategy is robust: it will use optimized variables values into ‘real’ trading periods (Out Of Sample periods) in the past to see if the strategy performed as good as in the optimized period (the In-Sample one).
07/19/2017 at 5:51 PM #41097Nicolas,
Yes, i know that is a superb tool, i have been using it since last year and i like it very much, i did not use it in this particular strategy.
One question though, from which % in an X period do you consider “suspicious” or “out of range”, for example: >90 % or >120% ?
Thanks
07/19/2017 at 8:25 PM #41113This is a very good question! and there is not an easy answer. I think it depends of the market behavior, a big WFE could be due to a gap or a sudden crash of the market in the good direction, so in this case this is not so very important as long as one WFE isn’t larger than 50% of the overall profit of the backtest. Of course, we also don’t want a lot of high WFE (+150, +200%+++), because the strategy we have developed was not designed to achieve these kind of huge results!
Because the WF tool only give result of the most profitable strategy, it introduces a bias in the test and that’s why we must make a deep analysis of the WFE and why they are good or not..
-
AuthorPosts
Find exclusive trading pro-tools on