Data Mismatch Errors

 
I host a forum at Forex Factory and we are all experiencing similar problems. The basic problem is backtesting with the last 3 months of 1 minute data. Because only approximately 2 months of 1 minute data  is available through the brokers, we are performing a data import of 1 minute data from a third party provider. Even though the import is carried out after going offline and deleting the history files in the server history folder and the tester history folder, current data is being introduced on any refresh even when disconnected from the broker. We are unable to locate the origin of the new data given that we are disconnected from the broker and this data refresh immediately causes data mismatch errors on backtesting. I contacted the Metaquotes Australian office and they were very evasive and suggest that I contacted my Broker even after explaining that this problem occurs even when disconnected.
 

Just a possibility and not a sure thing, but in the "history" folder for the Broker/Account sub-folder, there should be a a file with the name "ticks.raw", which I suspect may be the most recent tick data collected when connected. Maybe MetaTrader, is reapplying that data to the ".hst" files and thus changing them.

Try deleting that file and re-importing the history data.

Another possibility is maybe that MetaTrader is holding some data in a memory cache and thus overwriting the imported data when you refresh.

 
Thank you very much for that info. You have been extremely helpful and I will get back to you very shortly after i have repeated that test.
 
Unfortunately that didn't work. I moved ticks.raw and symbols.raw to a backup folder but on a M1 refresh, as well as the imported data appearing, the most recent 1 min data appeared even though disconnected from the server. I am inclined to think that there is a memory cache hidden somewhere else.
 

Well, try this. As soon as you finish importing the data, set the files to "read-only". If that does not work, if need be, close MetaTrader and then make the ".hst" files read-only. Then you can start MetaTrader again.

Alternatively, as this is what I do for myself, I use a 3rd party external tool to generate ".hst" and ".fxt" files and I then mark both types of files as read-only before starting MetaTrader. Unfortunately, I can't mention here, what that 3rd party tool is, as that would be considered advertising.

 
I completely understand the issue with advertising. Making the hst files read only is a great suggestion and no doubt will work. Thanks once again for your prompt assistance.
 

If my previous suggestion fails, try this:

  1. Import the data.
  2. As soon as it is done, do nothing else in Metatrader.
  3. In the File Explorer (or other method), copy all ".hst" files to a backup folder.
  4. Close MetaTrader.
  5. Copy all those files back to their original location.
  6. Mark all the files as read-only.
  7. Start MetaTrader again.

PS! I also send you a private message!

 
I found it critical not to refresh the 1 min data even though disconnected. You need to perform one backtest to write the fxt file and then shut down MT4.

It was not necessary to shift the hst files, just set them to read only plus set the fxt file to read only as well before logging back on.

 
My understanding is that mismatched errors originate from FXT file generation. So IMHO once you have set the fxt file R/O, it should display the RO warning in the log, but no mismatched errors in the test regardless whether you are connected or not.
 
Thanks for your comment and I can verify that you are correct.
Reason: