mt5 and mt4 backtest completely different

 
I made a simple EA and tried to backtest it both on mt4 and mt5. The results are completly different. On mt4 I use "every tick" and variable spreads with tick data from tickdata suite  and in mt5 i use "every tick based on real ticks".  Does anyone know why this is happening?
Files:
 
Jesper Christensen:
I made a simple EA and tried to backtest it both on mt4 and mt5. The results are completly different. On mt4 I use "every tick" and variable spreads with tick data from tickdata suite  and in mt5 i use "every tick based on real ticks".  Does anyone know why this is happening?

You should start to use the same data if you want to compare.

 

i always use mt5 for back testing

see here https://www.mql5.com/en/forum/23930

even though some of my EA are on mt4, i do code them in mt5 for optimization

real vs back testing
real vs back testing
  • 2014.05.11
  • www.mql5.com
a sample from my EA real above, back testing below there are 2 trades that are a little off from back tested...
 
Alain Verleyen:

You should start to use the same data if you want to compare.

If im using the same symbol and same time period, should I not at least get similar results? Maybe not the exact same results, but more or less the same? What do you exactly mean by "use the same data"? Cheers

 
Jesper Christensen:
I made a simple EA and tried to backtest it both on mt4 and mt5. The results are completly different. On mt4 I use "every tick" and variable spreads with tick data from tickdata suite  and in mt5 i use "every tick based on real ticks".  Does anyone know why this is happening?
Backtest MT5 is more accurate than MT4.
 

Forum on trading, automated trading systems and testing trading strategies

Same broker, different results

Sergey Golubev, 2020.07.25 09:15

  • It may be quotes,
  • it may be the time you start backtest (minutes/seconds),
  • it may be the number of ticks which is the different for every backtesting case;
  • it may be the following: using indicators as icustom which perform differently for different brokers based on the quality of quotes (example: iTrend indicator; some indicators in AscTrend system, more);
  • if your EA is martingale, scalping, or martingale scalping, or using Money Managementy so it may backtest differently every time you are backtesting.
  • and more ..

...

---------------------------

It is necessary to know the strategy (manual trading system) and agree with this strategy  (and it is necessary to know the seller) in case to believe in backtesting results (just my opinion).

Forum on trading, automated trading systems and testing trading strategies

Why EA's backtest and live have different result?

Sergey Golubev, 2021.01.29 05:57

  • if you backtest in MT5 with "every tick based on real ticks" mode in Metatrader 5 and having different results from real trading so it is very strange/abnormal case for MT5, and it may be related to the bug in your EA;
  • if you backtest in MT4 and having different results from real trading on MT4 so it is norma for MT4.

  • ..and read here for more: Testing trading strategies on real ticks and the explanation is on this post




     
    Jesper Christensen:

    If im using the same symbol and same time period, should I not at least get similar results? Maybe not the exact same results, but more or less the same? What do you exactly mean by "use the same data"? Cheers

    You don't have the same or even close results. You need to find way. There are 3 possibilities (could be 1 of the 3 or even all of them) :

    1. Difference in data. You can check that by importing you tickdata in MT5 (custom symbol).

    2. Difference in your code between mql4 and mql5 versions. You will have to check that once 1 is done and the results are still different.

    3. Difference in MT4 and MT5 strategy tester. There are difference, it depends of your code and strategy if they matters or not (swaps processing for example, or pending order execution...).

    Up to you to check.

    Reason: