EA Optimization pass result is different when I backtest it
-
Hello
This is something strange and I have not found the root of what can be happening. I am using MT5 with the EAs I have built with fsDreema.
When I have the EA optimization results, I sort the passes with my own criteria to choose the good ones to evaluate them. Once I have decided to check the EA performance for one optimization pass, I double click on it and the backtest runs. I have seen that the Total Net Profit for the in-sample backtest is different than the one given by the optimization pass. For the out-of-sample period is right.

Has anybody seen the same behavior?
Thanks
-
you have missing bars in history:

-
Hi miro1360
I was thinking something like that. But there is no way to download or choose any other history on MT5, I think. The history is downloaded from MetaQuotes server. So why is the result different from the optimization pass to the backtest if the history is the same? Could be a bug?
Thanks for your help.
-
it also depends on your strategy itself, if are you opening trades or if you have conditions with "candle ID = 0", this also can cause different results ... but mostly it is different history between metatraders ...
-
They don't make it as easy to download history in MT5 as it is in MT4.
Press Ctrl+u
Click on bars or ticks at the top (depending on the accuracy you require)
Select currency
Enter the date range
Click requestIt may say that the results are limited, if so also check, "Tools", "Options" and increase the max bars in chart number. If you make this number too large with many charts you may find your computer slows down.
-
Hi @L333z
Thanks for your guides. I will try to get the same history for all the accounts and check it again.
I wrote to MetaQuotes support and they said almost nothing about why the backtest result is different than the same get from the optimization.
Do you know if there is a way to import the history to MT5 as MT4? Such as by changing the downloaded files.
Thanks
Regards
-
Sorry I don't, I gave up with MT5 because I had strange issues with it. Shame because it is much faster back testing with multi thread support but pointless if the results are unreliable.
-
I shifted to MT5 to take advantage of my Workstation computation power but I am finding some issues and the MetaQuotes support says that the problem is the EA.
Anyway I appreciate your help.
Regards
-
Do not trust MT5 auto-download for data, better download and clean it yourself. You also get a lot of buggy spreads and flat candles, and the worst is that it replaces candles from one time-frame to a bigger one and doesn't even tell you!
-
Avoid optimising in 1min OHLC when it is an relatively HFT strategy.
-
@catequil I would avoid any kind of optimization that requires detailed modelling (too many strange variables anyways), this includes hard stops, trailing, current candle calculations, for me it would be a long and fruitless task.
In fact i only use opens (with a carefully made EA), i can trust these results a lot more

-
I experienced the same issue with the optimization results showing different (more) profits than the actual single tests and different drawdown, sharpe ratio and all the other values.
For me the problem was starting the optimization on a Saturday, when the markets are closed and it looks like my broker is feeding different tick values into MT5 over the weekend. Once the market opened I reoptimized and then the single test are showing the same profits and values as the optimization list.
I don't know why the tick data is different though, maybe someone has more knowledge and can shed some light on this issue..