Services/Products
Support
Trader's Market
Features arrow Promotion arrow Partner arrow
Services/Products
Support
Trader's Market

Support information for customers, including how to open an account, how to use the trading tools, and a collection of QAs from the help desk.

Web Trader Web Trader
Features Features Features
arrow
Promotion Promotion Promotion
arrow
Partner Partner Partner
arrow
Trader's Market Trader's Market Trader's Market
bg

PC Import historical data

good

This article was : 

published

updated

On MetaTrader 4 (MT4), historical price data can be imported in 9 timeframes, whereas MetaTrader 5 (MT5) provides access to both historical price and tick data across 21 timeframes. Use other brokers' historical data by importing data.

point What is tick data?

Importing tick data, the smallest unit that represents price changes, is a feature exclusive to MT5 and is not available in MT4. With this feature, you can significantly improve the accuracy of backtesting.

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. To be precise, the maximum number of bars is "2,147,483,647" for both, which will be automatically applied if a larger number is entered.

After that, click "OK" and 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". (Shortcut key: "F2")

History Center 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.

Select a symbol and timeframe on the History Center Select a symbol and timeframe on the History Center
point Symbols are categorized by each broker

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.

Symbol categories in the History Center Symbol categories in the History Center

Step 5

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

Import historical data Import historical data

Step 6

Click "Browse".

Select historical data Select historical data

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.

Import data from Browse Import data from Browse

Step 8

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

Specify the number of rows and columns you want to skip when importing historical data. For example, if you set "rows" to 1000, the first 1,000 rows of the selected historical data will be excluded from the import process.

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

Uncheck 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 View on the menu and select Symbols 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

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.

Symbol window Symbol window

Step 5

Select the symbol of the historical data to import.

Choose a historical data to import Choose a historical data to import

Step 6

Click "Create Custom Symbol".

Create a custom symbol Create a custom symbol
caution 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 specifying the importing data in the "Copy from" field when creating a custom symbol.

Related article: Create custom symbol

Step 7

In the custom symbol window, double-click the symbol name. Set a symbol name different from the existing ones, as well as any other details if necessary, and click "OK".

Name the custom symbol Name the custom symbol

Step 8

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

Import historical data for the custom symbol Import historical data for the custom symbol

Step 9

Click the "Browse" button.

Import historical data Import historical data

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.

Select the data to import Select the data to import

Step 11

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

Imported historical data Imported historical data

Number

Item name

Descriptions

1

Separator

Specify the character that separates each item in the data.

2

Skip

Specify the number of rows and columns you want to skip when importing historical data. For example, if you set "rows" to 1000, the first 1,000 rows of the selected historical data will be excluded from the import process.

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?

thumb_down No
thumb_down Yes

0 out of 0 people found this article helpful.

Thank you for your feedback.

Send