mismatch between backtest and live account results

 

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:
 

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.

 
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. 

 
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.
 
Marco vd Heijden:
This depends on the strategy used, and is highly unlikely.

Sorry, I am not sure what do you mean.

 
Make sure this is not a spread related thing. Buys executed at Ask price, whereas the chart shows Bids.
 
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

Reason: