Download MetaTrader 5

mismatch between backtest and live account results

To add comments, please log in or register
omar_askary
37
omar_askary  

Hi everyone,

I need help with this problem. I have tried to search for the solution on the web without success.

I am testing my EA on a live account in order to modify it. I tried to backtest the exact same period after running it for one week. The results are totally different (they also don't make sense). Look at the pictures below:

Not only does the backtester opens a trade that was not taken by the EA on the live account, it also enters the trades (all the trades for the whole week) way above the Bid/Ask levels.

To be clear: the backtest does not use downloaded historic data. Rather, it uses the data same data received from the broker. That is, it should be the exact same data used in the live account.

Please instruct me if I should provide more information to help solve the problem.

All help is appreciated.

Regards,

Omar 

Files:
Marco vd Heijden
Moderator
4753
Marco vd Heijden  

omar_askary:


it uses the data same data received from the broker. That is, it should be the exact same data used in the live account.

This is a misconception.

History only records OHLC data while the live account runs on a real market tick feed.

omar_askary
37
omar_askary  
Marco vd Heijden:

This is a misconception.

History only records OHLC data while the live account runs on a real market tick feed.

Thank you Marco,

 True! However, OHLC 1 min data should give trades that approximate the actual trades. If you look att the pictures that I supplied, the trade is initiated "outside" and above the bar. That is, it is not even a possible price value. 

Marco vd Heijden
Moderator
4753
Marco vd Heijden  
omar_askary:

Thank you Marco,

 True! However, OHLC 1 min data should give trades that approximate the actual trades.

This depends on the strategy used, and is highly unlikely.
omar_askary
37
omar_askary  
Marco vd Heijden:
This depends on the strategy used, and is highly unlikely.

Sorry, I am not sure what do you mean.

Stanislav Korotky
18242
Stanislav Korotky  
Make sure this is not a spread related thing. Buys executed at Ask price, whereas the chart shows Bids.
omar_askary
37
omar_askary  
Stanislav Korotky:
Make sure this is not a spread related thing. Buys executed at Ask price, whereas the chart shows Bids.

Thank you Stanislav,

It looks like you are right. I ran the backtest again directly after the market opened and it gave totally different, and more logical, results. It seems that the backtester used the current spread used which was more realistic. The funny thing is that I previously tried different spread values in the backtester without any effect. I think there is a lot for me to learn about the backtester.

Thanks again

To add comments, please log in or register