MQL5 Strategy Tester: Why does it fail?

 
Hello,
I observe in the Strategy Tester big differences between its results and reality. I use the one from mql5.
It is something that has surprised me so much that I have stopped trusting their estimates, since it does not happen to me with one robot but with several.
For example, I put the robot on demo on Thursday. On Friday I check its results at the same time as executing it in the Tester for the same date with "All ticks", my robots trade on M1, it only keeps one trade active, they open trades at the beginning of the new candles but with follow-up on tick . The differences are exorbitant!
Can someone give me a hint to know what I'm doing wrong?
Thank you very much.
 
febrero59:
Hello,
I observe in the Strategy Tester big differences between its results and reality. I use the one from mql5.
It is something that has surprised me so much that I have stopped trusting their estimates, since it does not happen to me with one robot but with several.
For example, I put the robot on demo on Thursday. On Friday I check its results at the same time as executing it in the Tester for the same date with "All ticks", my robots trade on M1, it only keeps one trade active, they open trades at the beginning of the new candles but with follow-up on tick . The differences are exorbitant!
Can someone give me a hint to know what I'm doing wrong?
Thank you very much.

You should use the every tick based on real ticks modelling quality, if you want to see the same or very similar results.

Also did you put your EA on the same Metaquotes demo account to compare the results or on some other broker?

 
Eleni Anna Branou #:

You should use the every tick based on real ticks modelling quality, if you want to see the same or very similar results.

Also did you put your EA on the same Metaquotes demo account to compare the results or on some other broker?

Yes, that's how it was every tick, same broker, same account, ...

 
febrero59 #:

Yes, that's how it was every tick, same broker, same account, ...

When I backtest some EA on MT5 strategy tester with every tick based on real ticks modelling quality, the results are identical with real/live trading, but I admit I use a specific broker MT5 terminal and tester.

I also use 50ms delay execution, because there is no such thing as zero latency and ideal execution, if you consider broker trade execution time too.

Maybe if you could post some examples of these different results we could help.

 
febrero59:
It is something that has surprised me so much that I have stopped trusting their estimates, since it does not happen to me with one robot but with several.

You should stop trusting the EAs, not the Strategy Tester, in my opinion. There are many EAs which use an algorithm which will show different results between backtesting and live results, and it's the EA's fault.
Even I did once a small but stupid mistake of using the current bar instead of the previous one for calculations. As a result, a small delay (1-5 seconds) in calculations (the CPU was too busy, the ping got too high, etc) was causing a different entry level, and thus different results.

Another common cause of different results are the indicators. If not coded properly, the indicator values (on live results) will be incorrect (maybe the chart data didn't load properly, etc). That's again the EA's fault. The Strategy Tester can't find all the bugs for you BUT the fact you don't get the same results on the live account is a sign of such possible bugs. If the EA is coded by you, log as much information as possible (the Print() function is more than enough) and then analyze the logs from the live trading.

I've seen many scalping EAs which show very similar live results with the backtested ones. Non-scalpers should show even more similarities.
Considering you're using M1, it might be a scalper. Scalping EAs are more affected by slippage which is hard to backtest. If the EA uses limit orders then the slippage is impossible to backtest (the "delay" parameter doesn't affect the limit orders).


febrero59:
On Friday I check its results at the same time as executing it in the Tester for the same date with "All ticks".

You mentioned "All ticks" which is different from "Every tick based on real ticks". Make sure you're using the second one.

 

I note to implement the delay in the execution and "Every tick based on real ticks".

I will keep trying. I want to trust the strategy tester again.

Thank you