Display the history generated from tick data on MT4 charts

Modified on Fri, 2 Aug at 11:43 AM

If you would like to have the history generated from the tick data displayed when you click the Open chart button, you need to go through the following steps:

1. Ensure that the MT4 terminal you are using is only used for tick data backtesting. If you don't have such a terminal, just make a copy of your live MT4 terminal folder somewhere, start it, and log in to your live account using the investor credentials in order to avoid any accidental trades. I recommend using the live account because backtests use your broker's environment and configuration by default (unless you override the settings, of course).
2. Close all open charts. Close the MT4 terminal. This step is not optional - MT4 caches the history data internally and failing to perform this step will result in seeing the broker data when you click Open chart.
3. Restart the MT4 terminal. Do not open any charts prior to running the tick data backtest.
4. Open the Tick data settings dialog and navigate to the Misc tab.
5. Enable the Always save the HST files when running a tick data backtest checkbox and press Ok.
6. Run your tick data backtest.
7. When it ends, click the Open chart button; you will notice that the chart data displayed is the same as the one used in your backtest. You can even switch the timeframes and you will still have the history that is in sync with the tick data in your backtest.

There is, however, one thing to note: if you are connected to the broker, MT4 will always overwrite the most recent 2048 bars with data from the server whenever you open a chart. That means about a day and a half's worth of data for the M1 timeframe, and at the same time, it means about 4 months of data if you are using the H1 timeframe. You have to keep in mind that if you haven't configured the GMT and DST to match your broker's time zone, the trades from your backtest may not match the data in these most recent 2048 bars. You can also disconnect from the broker and keep the terminal offline, but I don't recommend that because the MT4 terminal's default settings are horribly out of date (for example, it uses 4-digit symbols by default).