Sydney
Tokyo
London
New York
Next Open:

Download MT4 Historical Data
Free Guide

Get free price history for MetaTrader 4, import it in minutes, and backtest with accurate data. Covers the built-in History Center, Dukascopy, histdata.com, and tick data.

QUICK ANSWER

The Short Version

The fastest way to get MT4 historical data is the built-in History Center: press F2 in MT4, pick a symbol and timeframe, select the range, and download. For deeper or tick-level data, use Dukascopy or histdata.com and import the CSV files. All of these are free.

1
Open History Center
Press F2 in MetaTrader 4, or right-click a chart and choose History Center.
2
Pick symbol and timeframe
Select the symbol on the left, then the timeframe. M1 contains the most data; other timeframes build from it.
3
Download
Click Download. MT4 pulls the available history from your broker's server.
4
Start backtesting
Open the Strategy Tester, choose the symbol and timeframe, and run. For imported files, copy them to cache first (see below).
METHOD 1

Use MT4's Built-In History Center

The fastest method, with zero external files. The data comes from your broker's server, so it matches the prices you actually trade.

  • Press F2 anywhere in MT4 to open the History Center.
  • On the left, expand the broker account folder and pick the symbol (EURUSD, XAUUSD, etc.).
  • Select the timeframe you need. M1 holds the most history; MT4 builds M5, M15, H1 and D1 bars from M1 data.
  • Choose the start date, then click Download. The progress shows at the bottom of the window.
  • The data lands in the History Center, ready for charting and the Strategy Tester.

Limitation: brokers only serve the history they store, usually a few years per timeframe. For longer history or true tick data, use the external sources below.

METHOD 2

Free External Data Sources

When you need more history, true tick data, or data for symbols your broker does not carry, use these free sources.

SourceWhat you getFormatCost
Dukascopy (dukascopy.com/swiss)True tick data and M1 bars for forex majors and crosses, back to 1986BID/ASK CSV per dayFree
histdata.comM1 and tick data for forex pairs, indices, and metals, from 2001ZIP of CSV (ASCII)Free download, paid API for bulk
Your broker's MT4Live server history, current spreads and pricesNative .hst filesFree
MetaTrader Tester dataEvery tick and every tick-based on real ticks, generated from server dataNativeFree
Which one to pick: use the History Center for speed, histdata.com for clean one-file-per-month M1 data, and Dukascopy when your strategy needs real ticks with separate bid and ask prices. For most retail backtests, histdata.com M1 data is the right balance of accuracy and file size.
IMPORT

How to Import Downloaded Data into MT4

Exported files from histdata.com and Dukascopy are CSVs. MT4 reads them from a specific folder.

  • Unzip the downloaded file. You should see CSV files, one per day or per month.
  • In MT4, open File > Open Data Folder. This opens your terminal's data directory.
  • Go into MQL4 > Files and paste the CSV files there.
  • Restart MT4 so it scans the new files.
  • Open the History Center (F2), select the symbol and timeframe, and the imported data appears alongside server history.
Make it stick: before backtesting, highlight the imported range in the History Center, right-click and choose "Copy to cache". This forces the Strategy Tester to use your downloaded data instead of live server prices, which otherwise overwrite it.
BACKTESTING

Backtesting with Historical Data

The Strategy Tester needs quality data to give trustworthy results. Four settings matter:

  • Model: "Every tick based on real ticks" is the most accurate. "Open prices" is fastest but unrealistic.
  • Timeframe: test on M1 (or tick) even if you trade H1. MT4 builds higher timeframes from M1, so M1 tests are more accurate.
  • Spread: add your broker's typical spread as slippage so results reflect real costs.
  • Period: run at least two years, and include trending and ranging periods rather than one bull run.
FAQ

MT4 Historical Data FAQ

Is MT4 historical data free?

Yes. MT4 includes a built-in History Center that downloads free price history for any symbol, and free tick and M1 data is available from Dukascopy and histdata.com. You do not need to pay for basic historical data.

How far back does MT4 historical data go?

The built-in History Center keeps roughly the last 5 years of M1 data and up to 15 years of D1 data per symbol, depending on your broker. External sources like Dukascopy and histdata.com go back further, to 1986 in some cases.

Can I download MT4 tick data?

Yes. Dukascopy and histdata.com provide true tick data for major pairs. Tick data is much larger than M1 data and is mainly used for precise backtesting of strategies that depend on spread and slippage.

How do I import historical data into MT4?

Download a CSV file, then copy it into your MT4 data folder: File > Open Data Folder > MQL4 > Files, and restart the terminal. The data then loads into the History Center (F2) for charting and backtesting.

Why does my backtest show wrong prices?

Usually because the terminal is online and MT4 uses live server data instead of your downloaded file. Open the History Center, select the symbol and timeframe, highlight the imported data, right-click and choose "Copy to cache" before running the test.

Which timeframes do I need for backtesting?

M1 data is the minimum for realistic tests. Higher timeframes are built from M1, so downloading M1 (or tick) data covers every timeframe from M5 up to D1.