Aligning backtesting to Live EA - dukascopy data does not match mt4 broker

 

Of course not I hear you cry!!!!

So have any of you found a solution to this?

I am using Dukascopy data, downloaded via birts eareview, which gives me a better modelling result.

I backtest my ea to get the optimized settings, and then use these settings for the ea on my live mt4 account.

If a I run a backtest over the recent trades on my broker data - i naturally get the trades it has taken in the Live account - great, as expected.

However if I now use Dukascopy data for the same period (and adjust the GMToffset), using the same settings, I don't necessarily get all the trades that the Live EA took. Most are there, but out of 9 trades I am missing 3.

So this naturally leads me to think that the accuracy of the settings I use, gained from optimization across Dukascopy data, isn't going to be that relative running in a live account with a different broker - in this case Oanda.

How have any of you overcome this issue for the settings for your ea's? Is it just a matter of using and ECN broker instead which maybe closer to the Dukascopy data?

 

I never use MT4's backtesting for this kind of reason. There are various differences between the backtest and the reality of the same time period.

I'm sure others can point out many differences but for me the big one is that backtesting does not use the actual spread data... i.e. if you live account is variable spread, the backtest will not be. It will only use the latest spread when you initiate the test. ECN brokers will not help with this. Using a fixed-spread broker would solve this problem.. but it's a drastic solution.

Overcome it be forward testing (run the EA on a demo account for some time).

Personally I use VBA to run backtest on the market data I collected.. but if you're getting into programming, I'm sure there are better solutions.

And generally, understand your EA and set it with logic and reasoning.. not just blindly with work seems to work in testing. After setting, if testing proves to be unprofitable, then re-think the logic.

 
alladir:

I never use MT4's backtesting for this kind of reason. There are various differences between the backtest and the reality of the same time period.

I'm sure others can point out many differences but for me the big one is that backtesting does not use the actual spread data... i.e. if you live account is variable spread, the backtest will not be. It will only use the latest spread when you initiate the test. ECN brokers will not help with this. Using a fixed-spread broker would solve this problem.. but it's a drastic solution.


thanks alladir - I agree with you here, but one of the benefits of using the Tick Data suite is that it can use variable spread. Essentially it calculates the spread from the bid and ask and adds that to the files it creates (fxt/hst). So this isn't my problem. I have error messages that tell me if the spread being too high is the issue, and these did not appear.

As mentioned my EA is running in live and is profitable - it is essentially behaving the way the testing suggested, from a percent win basis. But i still need to try to understand how to make the testing more realistic to the broker I use, or whether I should change brokers etc. Using the Duksacopy data provides the best modelling for backtesting, but there still seems to be a disconnect here to how the broker operates. Somehow i need to try to align these better.

 

Hmm, then the best way is attention to detail. If you have the tick data, your backtest trades, and your forward test trades.. look at the differences and why.

Takes time... but I get a weird satisfaction out of that kind of work.. :)

 

No such thing as Exact when it comes to Ticks. If the Expert isn't broken.... dont fix it. :)

You can try reading some of our recent threads, like the long_ones with 3+ pages responses.

Hell, I'll just give you the link:https://www.mql5.com/en/forum/146837/page3#842537 . Have fun.

 

DukaScopy tick data (downloaded, exported with TickStory) contains separate ask, bid volume, the volume in tickstory candle format is only bid volume - which is not MT4 volume (tick count).

So it seems volume based EAs, indicators may give different results.


This makes sense of MT4 support (storing) brokers' real tick data, the tests could be finetuned to each broker - probably they wouldn't want this :-)

 

Also, and probably more to the point, trading indicators that react to live prices would reveal their true results historically.

 
ubzen:

No such thing as Exact when it comes to Ticks. If the Expert isn't broken.... dont fix it. :)



I agree with you, but I would like to try to understand why this ea is running so much better than the others. They have all been tested in the same way using data from Dukascopy. I want to understand if my methods for testing and the settings i get from this will translate appropriately to a live account. Some ea's run inline with what the testing suggested, and some aren't. So my initial thoughts were, perhaps the Dukascopy data maybe more inline with using an ECN broker as opposed to a market maker - does that make sense?


I would have thought this issue would have affected others, so was wondering what solutions people have put in place?

For now I will take the approach:

Get test results and settings from optimization against Dukascopy data for 3mths.

Get test results and settings from optimization against Dukascopy data for last month.

Run against the brokers data for 3mth

Run against brokers data for 1 mth

Compare all the settings and see if there are common settings from all of these tests.

Reason: