Once per Bar - Different Backtesting Models produce Different Results
-
I have searched extensively to try and see if this was already answered.
In terms of how ticks are delivered, I have studied and understood the 4 different models for MT5 strategy tester. Great videos by Darwinex on this. I am missing something obvious though.
https://fxdreema.com/shared/kj4MsC3Nc
All condition blocks set to candle ID 1.
The EA should only trigger on the 1st tick of the new bar of the timeframe being tested, and look back at the previously completed bar of the timeframe.
I share an example where I got the profit and loss calculated from the open price of the in trade loop and the prior candle close (ID 1).
So the trades should produce exactly the same results for Open Prices Only, and Every Tick as Real Tick.
Why when looking at the visual tester does the stop loss get triggered at different points on the 2 different models. I would have thought that since the EA is setup to only be activated on the first tick of each new bar, and the profit and loss are only calculated on the first tick of each new bar, the 2 results should be identical.
With once per bar I thought it would only allowing the same single tick through, whether that is open price only or every tick as real ticks, so then it should close at the same point and the number of trades should be identical.
What am I missing to not understand the difference in results?! Thanks.
-
@ed_h Hello,
I'm not sure how helpful will this link be: https://mqldiscussions.com/t/how-granular-is-the-past-data-in-mql5/423
I tested your EA with open prices, every tick and every tick as real tick and your theory is correct when using open prices or every tick. However every tick as real tick seems to be more accurate to real world conditions while the former models have some kind of emulation from data collected at the m1 time frame and that is why you see different results.I personally don't think that this difference should make or break a strategy. In the past I made EAs the worked sooo well on 1 broker and were ok on another. Backtesting on MT5 different brokers will show you how much different broker prices are. Even though they look small, some strategies break because of these minute difference.
-
Thank you @q8carpenter for the response. Checked the link out too.
Have you ever checked out Darwinex's videos? They are very informative:
https://www.youtube.com/watch?v=dGFphm2bFbs&t=333s
I think I am coming to realise that I was testing scalping methods that should be looking more at every tick as real ticks for testing.
The higher the timeframe and the longer the trades/larger the required pip move, the more accurate the other strategy tester models will be - I tested my shared EA on higher timeframes and the results were closer.
What I take from your response, is that if a strategy is robust enough small differences in Open Prices Only vs. Every Tick as Real ticks shouldn't break the edge (if the strategy is appropriate to test on OPO that is).
Plus there are such variations with brokers price data in live markets and requotes/delays in execution this can be detrimental but cannot be tested. So only in live testing will the truth come out as to if the edge is true.
-
@ed_h i totally agree
-
Nice one @q8carpenter . Appreciate your input, it has been a real help.