Importing bar data in MT4, exporting bar data as CSV

Modified on Sat, 30 Sep 2017 at 11:51 AM

If you wish to import the tick data as bar data in MT4 or to export it as a CSV, this functionality isn't built directly into the Tick Data Suite.


However, to accomplish that you can go through the following steps:

  1. Start Metatrader 4.
    Steps #2-8 are designed to ensure that you have tick data history for the symbol, GMT and DST that you want; if you already ran at least one tick data backtest with this configuration, you can skip to step #9.
  2. Select the symbol you want to import data for in the backtest pane.
  3. Enable the Use tick data checkbox.
  4. Click the Tick data settings button to open the configuration dialog.
  5. Configure the desired GMT and DST and make sure the correct source and symbol are selected in the respective dropdowns.
  6. Enable Use date and select a date range that is covered by tick data but spans a very short interval (e.g. 2017.02.01 - 2017.03.01) in order to make the backtest progress fast.
  7. Select an EA that is fast, e.g. the MACD Sample EA.
  8. Click Start to run the backtest and wait until the backtest is over.
  9. Head to File -> Open Data Folder.
  10. Close MT4. Do not close the Explorer window opened in step #9.
  11. Run the Tick Data Suite support assistant.
  12. Click the Open data folder button in the Settings tab.
  13. Close the Tick Data Suite support assistant but do not close the Explorer window opened in step #12.
  14. In the Explorer window opened at step #12, browse to the selected tick data source, selected symbol and configured GMT/DST folder.
    For example, for Dukascopy EURUSD GMT +2 US DST, it will be Dukascopy\EURUSD\GMT2DST1
    All the values should be obvious except DST which is 0 for none, 1 for US, 2 for EU, 3 for Australian, 4 for Russian.
  15. Select all the HST files, right click one of them and click Copy.
  16. Switch to the Explorer window opened at step #10.
  17. Browse to history\[your_broker_server], for example history\ICMarkets-Demo01 if your account was on the IC Markets demo server 1.
  18. Right click and select Paste. Answer yes if asked to overwrite.
    Steps #19+ are only required for exporting the data.
  19. Start MT4 once more.
  20. Head to Tools -> History Center (or press F2).
  21. Find the symbol you imported data for. If necessary, browse the categories to find it.
  22. Click the + icon next to it to expand the available timeframes.
  23. Select the timeframe that you wish to export bar data for.
  24. Click the Export button.
  25. Browse to the path that you want to export, name the file as you want and finally click the Save button.