PC Import historical data
This article was :
published
updated
You can import historical and tick data in 21 different timeframes on MetaTrader5 (MT5), and in 9 timeframes on MetaTrader4 (MT4). Use other brokers' historical data by importing data.
Tick data, the smallest unit that represents price, is not available in MT4, but only in MT5. You can increase the accuracy of backtesting by importing tick data.
Here we will look at how to import historical data on MT4/MT5.
Switch between MT4/MT5 tabs to check the steps for each.


Step 1
First, increase the number of bars on charts. Click "Tools" on the menu and select "Options". (Shortcut keys: "Ctrl"+"O")


Step 2
In the "Charts" tab, type "9"s till it reaches the ends of the "Max bars in history" and "Max bars in chart" fields. The maximum number of bars is "2,147,483,647" for both, which can be saved and retrieved automatically by typing "9"s. After that, click "OK" and restart MT4.


Step 3
Next, import the historical data. Click "Tools" on the menu and select "History Center".


Step 4
Double-click on the symbol name of the historical data you wish to import to open the timeframe menu, and then choose your preferred timeframe.


If you open the History Center, you will find some categories such as "Forex" and "Crypto", and symbol names such as "EURUSD" and "USDJPY" under each category. This categorization differs from broker to broker. For currency pairs, "Forex" and smaller categories such as "Major" and "Minor" are often used.


Step 5
In the "History Center" window, click "Import".


Step 6
Click "Browse".


Step 7
Choose the historical data file to import. If you can't find the file, change the file type to "All Files" in the lower right so that all file formats will be shown. Available files are csv and hst.


Step 8
Configure the details of historical data to import. Click "OK" and historical data will be imported.


Number |
Item name |
Descriptions |
---|---|---|
1 |
Separator |
Specify the character that separates each item in the data. |
2 |
Skip |
Specified rows and columns will not be imported. Specify the rows or columns if you don't want to import any data in the file. |
3 |
Shift |
Shift the historical data by set hours. |
4 |
Use selected only |
Check this box when you want to only import the specified historical data. Don't check it if you don't specify the data. |
5 |
Volume |
Check this box when you don't want to import the volume data. |
Step 1
First, increase the number of bars on charts. Click "Tools" on the menu and select "Options". (Shortcut keys: "Ctrl"+"O")


Step 2
Set "Max bars in chart" to "Unlimited" in the "Charts" tab. Click "OK" and relaunch MT5.


Step 3
Next, import the historical data. Click "View" on the menu and select "Symbols". (Shortcut keys: "Ctrl"+"U")


Step 4
Go to the "Bars" tab if you want to import the histrical bar data, and the "Ticks" tab if you want to import the tick data.


Step 5
Select the symbol of the historical data to import.


Step 6
Click "Create Custom Symbol".


In MT5, you cannot delete or overwrite existing historical data. When importing historical data, you must first create a new custom symbol. You can save multiple symbols using the same settings by changing the symbol name when creating a custom symbol to import historical data.
Step 7
In the custom symbol window, double-click the symbol name. Set a symbol name different from the existing ones and click "OK".


Step 8
Select the symbol name you have set and click "Import Bars/Ticks". Your symbol name will be shown under "Custom".


Step 9
Click the "Browse" button.


Step 10
Choose the historical data file to import. If you can't find the file, change the file type to "All Files" in the lower right so that all file formats will be shown. Available files are csv and hst.


Step 11
Configure the details of historical data to import. Click "OK" and historical data will be imported.


Number |
Item name |
Descriptions |
---|---|---|
1 |
Separator |
Specify the character that separates each item in the data. |
2 |
Skip |
Specified rows and columns will not be imported. Specify the rows or columns if you don't want to import any data in the file. |
3 |
Shift |
Shift the historical data by set hours. |
4 |
Tick volumes |
Check this box when the historical data has tick volumes. |
Was this article helpful?
0 out of 0 people found this article helpful.
Thank you for your feedback.