How to Import Historical Data into MT5 (Windows)

MT5 allows for the creation of custom symbols and the import of historical data for purposes such as backtesting.

Here, we will introduce how to create custom symbols in MT5 and import historical data for backtesting.

You can download 1-minute historical data from Titan FX here.

Download Historical Data

Preparing for Historical Data Import

Setting Maximum Bars in Chart

First, set the limit for the maximum number of bars on the chart to unlimited. This setting allows the system to handle large amounts of data. Select Options from the Tools menu in MT5.

In the Options dialog that appears, select "Unlimited" from the drop-down menu for "Max bars in chart" in the "Charts" tab and click the "OK" button. Restart MT5 at this point.

Importing Data

Select "Symbols" from the "View" menu in MT5.

In the Symbols dialog that appears, switch to the "Bars" tab, change the symbol name in the upper left to the symbol you want to import, and then click the "Create Custom Symbol" button.

In the "Custom Symbols" dialog that appears, change the symbol part in the upper right to any symbol name (different from existing symbol names), and click "Yes" in the lower right.

In the "Bars" tab of the "Symbols" dialog, change the symbol name in the upper left to the created symbol name and click the "Import Bars" button.
Note: That the created custom symbol is stored under "Custom" in the list.

In the "Import Rates" dialog that appears, click the "Select" button in the upper right, choose the file to import, adjust other settings as needed, and click "OK". Note that if your CSV file uses commas as separators, select ','; if there is a header, change the skip rows to 1, and adjust as necessary if there are data elements you do not want to read. If there are multiple files, click the "Import Bars" button again and import the data similarly.

Once the data import is complete, move to the "Specification" tab, select the created symbol name, and click "Show Symbol". When the icon next to the symbol name turns yellow, the symbol is activated and will appear in market watch and other displays. Finally, press the "OK" button to close the dialog. Note that the created custom symbol is saved under "Custom" in the left list.

The custom symbol appears in the market watch, etc., allowing you to display charts and use them for backtesting.