Thorough testing of trading strategies in the MetaTrader 4 (MT4) Strategy Tester requires deep historical quote data for the trading instrument. Deeper and more complete quote history allows modeling more market situations.
Available history depth in MT4 is measured in bars (candles). By default, the terminal sets 512,000 historical bars (Tools menu → Options → Charts tab), with a maximum of 65,000 visible in the chart window (see Fig. 1).

Fig. 1. MetaTrader 4 terminal settings.
This amount suffices for higher timeframes like monthly, weekly, or daily. Data shortages are acute on lower timeframes, such as M1, where 65,000 bars cover only about 1.5 months.
The M1 timeframe is the base for all others, as M1 data can generate history for any timeframe, even custom ones. M1 also enables detailed analysis of larger candle formation. Without minute-level data for an hourly candle, intrabar developments are guesswork. During strategy testing, MT4 simulates missing minute bars, which approximates but lacks perfect accuracy. Thus, prioritize deep quote history detailed to the M1 timeframe.
Obtaining Quote History in MetaTrader 4
MT4 provides built-in tools for deep, detailed quote history. Follow these steps.
Step 1. Set sufficient bars in history and visible bars (see Fig. 1). Calculate: Most instruments offer 11.5 years (from 01.01.1999). One year has ~260 trading days (52 weeks × 5 days). Each day: 1440 minutes (24×60). Total: 11.5 × 260 × 1440 = 4,305,600 minutes. Set to 5,000,000 bars for margin as history grows.
Step 2. Download full history from MetaQuotes server. Open History Center (Tools → History Center or F2), select instrument and timeframe (see Fig. 2). Ensure the timeframe icon is highlighted. Click Download; confirm MetaQuotes server warning and wait. First download: ~40 MB, time varies by connection.

Fig. 2. Using the History Center.
Step 3. Restart the terminal after download, as max bars apply on launch.
Verify: Open the instrument chart, set M1, press Home to go to data start. Candles from 04.01.1999 confirm success.
However, downloaded history often has data gaps or ‘holes’ (see Fig. 3). In 2010 alone: gaps 07.05.2010–08.07.2010 and 23.07.2010–05.08.2010. Using gappy data deceives backtesting. Prepare hole-free history for serious work, excluding unnatural gaps (real low-volatility periods like nights are natural).

Fig. 3. Sample history gap.
Importing Quotes into MetaTrader 4
Deep M1 history for MT4 is scarce, but available for MetaStock. Author converted MetaStock data for 14 major instruments into MT4 format.
Import steps:
Step 1. Close MT4.
Step 2. In terminal’s history\ folder, delete .hst files for the instrument (e.g., EURUSD1.hst to EURUSD43200.hst).
Step 3. Launch terminal.
Step 4. Open History Center, select instrument/timeframe (Fig. 2).
Step 5. Click Import (see Fig. 4). Browse to unzipped file.

Fig. 4. Importing quote history.
Step 6. Set server time shift. Data uses GMT+1. Shift: 0 for GMT+1, -1 for GMT, +1 for GMT+2. Use broker server time, not local PC time.
MT4 Server Time Offset
Calculate server offset: On a trading day, open Market Watch (View → Market Watch or Ctrl+M). Compare server time in title bar to PC local time. Subtract difference from local timezone if PC ahead; add if behind (see Fig. 5).

Fig. 5. Calculating broker server timezone.
Step 7. Click OK and wait. Yields quality M1 history from 03.01.2001 to 22.06.2011.
Generating Timeframes from M1
Use built-in period_converter script:
- Activate instrument chart, set M1.
- Open Navigator (View → Navigator or Ctrl+N).
- Expand Scripts, double-click period_converter.
- Settings tab → Inputs: Set ExtPeriodMultiplier (60=H1, 240=H4, 1440=D1, 10080=W1, 43200=MN1).
- OK; wait seconds. Check Experts tab (View → Terminal or Ctrl+T): ‘75673 record(s) written’ confirms. Right-click chart → Remove script.
Attention! Avoid switching chart periods until all timeframes synthesized for accuracy.
Download MT4 Quotes
AUDJPY M1 history
AUDUSD M1 history
CHFJPY M1 history
EURCAD M1 history
EURCHF M1 history
EURGBP M1 history
EURJPY M1 history
EURUSD M1 history
GBPCHF M1 history
GBPJPY M1 history
GBPUSD M1 history
GOLD M1 history
SILVER M1 history
USDCAD M1 history
USDCHF M1 history
USDJPY M1 history
“,
“excerpt”: “Learn to download, import, and generate complete MT4 quote history for precise strategy backtesting. Fix data gaps with M1 imports from 2001-2011 for major pair
FAQ
What is the minimum historical data needed for accurate MT4 backtesting?
MT4 requires deep M1 (one-minute) quote history for accurate backtesting, as M1 data serves as the base for all other timeframes[1]. While MT4 defaults to 512,000 historical bars, this covers only about 1.5 months on M1 timeframes. For serious strategy testing, aim for 2-3 years of clean data minimum, expanding to 5+ years to cover different volatility regimes and market conditions[2].
How do I import quote history into MetaTrader 4?
Close MT4 and delete existing .hst files for your instrument in the terminal’s history folder. Reopen MT4, access History Center (Tools → History Center), select your instrument and timeframe, click Import, and browse to your data file. Set the correct server time offset by comparing your broker’s server time to your local PC time, then click OK to complete the import[1].
Why is 99% tick data accuracy important for backtesting?
Low-quality backtesting data creates false confidence in strategy performance. On rough bar data, trades appear safe, but on accurate tick data, stops may be hit that weren’t visible in candles. Small slippage, spread spikes, and micro-wicks accumulate across trades, and inaccurate data makes drawdowns appear smaller than they actually are[2].



