Select Language

Import historical data

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.

point What is tick data?

Tick data, the smallest unit that represents price, is not available in MetaTrader4 (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.

mt4
mt5

Step 1

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

Options of the toolbar Options of the toolbar

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, restart MT4.

Max bars in history Max bars in history

Step 3

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

History Center History Center

Step 4

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

Import historical data Import historical data

Step 5

Click "Browse".

Select historical data Select historical data

Step 6

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.

Import data from Browse Import data from Browse

Step 7

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

Import completed Import completed

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")

Click Tools on the menu and select Options Click Tools on the menu and select Options

Step 2

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

Set Max bars in chart to Unlimited in the Charts tab. Click OK Set Max bars in chart to Unlimited in the Charts tab. Click OK

Step 3

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

Click View on the menu and select Symbols Click View on the menu and select Symbols

Step 4

Import historical bar data

In the "Bars" tab, select the symbol of the historical data to import.

In the Bars tab, set the symbol In the Bars tab, set the symbol

Import historical tick data

In the "Ticks" tab, select the symbol of the historical data to import.

In the Ticks tab, set the symbol In the Ticks tab, set the symbol

Step 5

Click "Create Custom Symbol".

Import historical bar data

Import historical bar data Import historical bar data

Import historical tick data

Import historical tick data Import historical tick data
point Existing historical data can't be overwritten in MT5

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 6

In the custom symbol window, double-click the symbol name. Set a symbol name different from the existing ones and click "OK".

In the custom symbol window, double-click the symbol name. Set a symbol name different from the existing ones In the custom symbol window, double-click the symbol name. Set a symbol name different from the existing ones

Step 7

Import historical bar data

Select the symbol name you have set and click "Import Bars".

Import historical bar data Import historical bar data

Import historical tick data

Select the symbol name you have set and click "Import Ticks".

Import historical tick data Import historical tick data

Step 8

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

Configure the details of historical data to import Configure the details of historical data to import

Number

Item name

Descriptions

1

File

Click "Browse" to choose the historical data file to import. Available files include csv, txt, and prn.

2

Separator

Specify the character that separates each item in the data.

3

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.

4

Shift

Shift the historical data by set hours.

5

Tick volumes

Check this box when the historical data has tick volumes.


Date

Created

 : 2022.09.09

Update

Last updated

 : 2023.03.10

Writer

Takayoshi Nakamaru

Manual production consultant, MBA

arrow
Takayoshi Nakamaru

Nakamaru is a manual production consultant at FINTECS, a company that specializes in creating manuals for their clients.
With a wide range of experience from fintech to entertainment, he presents what user-friendly manuals should be like.
He works with numerous large corporations as an external manual production project manager.

【Business information】
http://www.fintecs.co.jp/profile/

Supervisor

Akira Takagi

Systems engineer, MetaTrader administrator

arrow
Akira Takagi

After graduating from Computer Science at the Uninove, Brazil, in 2014, he has worked on various systems development projects.
He participated as a developer in the launch of forex services in 2019. Since then, he has also been involved in the development of MetaTrader plugins and APIs. He is certified by MetaQuotes as a MetaTrader5 Administrator and active in consulting and advisory as well.

Was this article helpful?

We hope you find this article useful. Any comments or suggestions will be greatly appreciated.
We are also looking for writers with extensive experience in forex and crypto to join us.

please contact us at [email protected].

Thank you for your feedback.
Thank you for your feedback.

Disclaimer:arw

All information and content provided on this website is provided for informational purposes only and is not intended to solicit any investment. Although all efforts are made in order to ensure that the information is correct, no guarantee is provided for the accuracy of any content on this website. Any decision made shall be the responsibility of the investor and Myforex does not take any responsibility whatsoever regarding the use of any information provided herein.

The content provided on this website belongs to Myforex and, where stated, the relevant licensors. All rights are reserved by Myforex and the relevant licensors, and no content of this website, whether in full or in part, shall be copied or displayed elsewhere without the explicit written permission of the relevant copyright holder. If you wish to use any part of the content provided on this website, please ensure that you contact Myforex.

  • Facebook
  • Twitter
  • LINE

Myforex uses cookies to improve the convenience and functionality of this website. This website may include cookies not only by us but also by third parties (advertisers, log analysts, etc.) for the purpose of tracking the activities of users.Cookie policy

I agree
share
Share
Cancel