This article introduces how to download historical data and import it into MetaTrader 4 (MT4).
[What is historical data?]
Historical data records past exchange rates. Downloading the data and importing it to MT4 makes the backtesting easy.
Historical data is required to perform validation using past price movements, regardless of whether it is done manually or automatically using Expert Adviser (EA). MT4 contains a certain period of historical data by default, but that is insufficient. Historical data can be downloaded with the same operation no matter which broker you are using, as long as you are an MT4 user.
I hope this article will help you in your future trading.
[Summary]
How to download historical data and import it into MT4
(1) Specify the number of bars in the history
(2) Select the currency pair and time frame of historical data
(3) Download historical data
Contents
How to Download Historical Data
1. Specify the maximum number of bars in the history
First, specify the maximum number of bars to be displayed in MT4.
(1) Start MT4 and proceed to [Tools]-[Options].
Chart: XM (MT4 account)
XM Official Site (Outside Europe)
(2) Select "Charts" tab and change "Max bars in history" and "Max bars in chart."
What is "Max bars in history"?
This setting enables the specified number of bars to be saved in the past chart. The recommendation is [2,147,483,647], the maximum value. If you enter a number greater than the value and click [OK], MT4 will automatically correct the value.
What is "Max bars in chart"?
This setting specifies how many bars are to be displayed on the chart. The maximum value is [2,147,483,647]. However, the higher the value is, the longer it takes to switch the chart. This value can be changed anytime.
2. Set the currency pair and time frame of historical data
(1) Proceed to [Tools] - [History Center]
(2) Select the currency pair and time frame of historical data and click "Download" to start the download. The currency pairs offered vary between brokers. In the case of XM's EUR/USD, it is included in [Forex 3].
3. When alert is displayed during download
The above alert during the download of historical data means that the selected historical data is retrieved from MetaQuotes Ltd, developer of MT4.
Exchange rates vary slightly between brokers because each broker uses different covering financial institutions.
This alert lets you confirm whether it is acceptable if there is any inconsistency between MetaQuotes' historical data and your broker's one. A slight margin of rate error is inevitable when multiple brokers are used, and this error is not a problem. So, it is no problem to click OK.
4. How to check if the download has been completed successfully
Check whether the number of records in [Database] increases to confirm whether the download is complete. If no record is downloaded at all, the value remains zero.
Conclusion
How to download historical data and import it into MT4
(1) Specify the number of bars in the history
(2) Select the currency pair and time frame of historical data
(3) Download historical data