Backtesting difference depending on a live or demo account, same broker

 

Hi,

I have an odd problem. I am developing an EA and doing a lot of backtesting. I have two accounts by Tadawulfx. One demo account and one live account. I did som backtesting on my demo account using a history file I created from DukasCopy. The problem is that when I transfer the best result from my demo backtesting and run the backtest on my live account I get two different results, even thoug the history file is the same. I have located the difference to the ArrayCopyRates function.

I guess my question is, when backtesting does ArrayCopyRates use data from the history file (it seems not to) or does it fetch data from the server (that could explain the difference when testing on either live or demo). If the latter is the answer then whatfore do we need the history file.

Best regards,

Canman888

Reason: