How to Download Historical Data in MT5 for Backtesting

Learn where MT5 stores price history, how to request bars and real ticks, export CSV files, import custom-symbol data and resolve missing-history errors before testing an EA.
 
Written byHenry Green
Published
Last updated

Key Takeaways

  • For MT5 historical price data, use desktop Market Watch → Symbols → Bars or Ticks → Request; available coverage depends on the connected server.
  • Strategy Tester can load required bar and tick history automatically and may shift the effective start date if earlier data is insufficient.
  • MT5 does not use the traditional MT4 History Center workflow; the Toolbox History tab is account trade history, not market-price history.
  • Real ticks and generated ticks are different, and even real-tick tests may use generated data where genuine records are absent.
  • Exported price files can be inspected as CSV; importing external market history is supported through custom symbols.
  • A 100% History Quality reading checks minute-bar consistency, not guaranteed real-tick coverage, live execution accuracy or future profit.
Important risk information: Historical price records and simulated strategy tests cannot reproduce every live execution condition or predict future trading results. Incomplete timestamps, variable spreads, unsuitable symbol specifications and gaps in historical quotes may affect any backtest. Trading leveraged forex products involves substantial risk. Examples below explain data structures and checks, not actual FXGlory performance or trading recommendations.

Quick answer: To download historical data in MT5, open the desktop terminal, show Market Watch with Ctrl+M, right-click in Market Watch and choose Symbols (or press Ctrl+U). Select the instrument, open its Bars or Ticks tab, and click Request. MetaTrader 5 retrieves the historical data available from the connected broker's server, or shows previously downloaded data. Select Export in that tab if you want to save the requested data as a CSV file. Data availability and depth depend on the server and symbol.

This guide explains broker-supplied price history, how MT5's Strategy Tester loads it, when tick data matters, and how to diagnose missing history. It also shows how external data imports work through custom instruments. Historical price data is not your account's transaction history: downloading past quotes for testing is different from exporting the trades shown in the Toolbox History tab.

What Is Historical Data in MT5?

MT5 historical data is a record of earlier market prices used to draw charts and to simulate how a trading strategy would have behaved. The platform stores price history principally as one-minute (M1) bars, builds longer-period bars from that base, and can also retain individual ticks when the connected server makes them available. The tester uses M1 bars and, depending on the modeling option, actual ticks or ticks generated from those bars.

Three different kinds of history in MetaTrader 5
DataContainsUsed forImportant distinction
Historical price barsTimestamp, open, high, low, close and volume-related fieldsCharts, indicators and tester calculationsAn OHLC bar does not show every intrabar price change
Historical ticksTime-stamped quote changes, including available Bid/Ask and other tick fieldsMore granular simulations, particularly for price-sensitive EAsCoverage, quote depth and availability vary by broker and period
Account trade historyOrders, deals, positions and account transactionsReviewing what an account actually didIt is not the price series required to backtest a strategy

For example, an hourly EUR/USD candle can show its high and low without revealing whether the high occurred before the low. For an Expert Advisor (EA) that reacts within a bar, that order can materially affect simulated entries, stops and exits. High-quality historical data improves the usefulness of a simulation, but cannot validate an unprofitable trading idea by itself.

MetaTrader's Market Watch documentation explains the separate Bars and Ticks history controls; its real versus generated ticks guide explains why the tester models some price movements instead of replaying every observed quote.

How to Download Historical Data in MT5

Use the desktop MetaTrader 5 terminal connected to the trading server whose price history you want to inspect. This procedure is for market-price data, not a mobile application's account activity report.

  1. Open MetaTrader 5 and connect. Sign in to an appropriate trading or demo server and confirm the terminal has a working connection. History depth depends on that particular server and instrument.
  2. Open Market Watch. Choose View → Market Watch, or press Ctrl+M. If the instrument is missing, open the Symbols dialog and show the relevant symbol.
  3. Open the Symbols dialog. Right-click within Market Watch and choose Symbols; the Ctrl+U shortcut also opens symbol management.
  4. Choose the actual instrument. Find the appropriate pair, such as the EUR/USD symbol offered on your server. Some servers use instrument suffixes or separate contract variants, so check the specification rather than assuming the symbol name is identical across brokers.
  5. Select Bars or Ticks. Use Bars for OHLC price history and Ticks for available individual quote records. The timeframe selector on the Bars view changes the displayed aggregation; MT5's underlying bar history is stored as M1 data.
  6. Click Request. The terminal requests the available history from the server or displays history already cached. Large tick requests can take longer and occupy significant disk space.
  7. Inspect what was returned. Check the oldest and newest records, the instrument, and whether your intended test interval is represented. Do not assume that a request guarantees an arbitrary number of years of coverage.
  8. Export if necessary. Click Export in the Bars/Ticks history view to save the requested price data as CSV. An exported research file is not automatically imported into an EA test.
Which history tab should you choose?
GoalWhere to goWhat to check
Inspect candlestick price historySymbols → Bars → RequestSymbol, timestamps, OHLC and coverage
Inspect observed quotesSymbols → Ticks → RequestBid/Ask availability, timestamps and long gaps
Save a historical price fileBars/Ticks → ExportFile columns, separator and time zone
Backtest an EAStrategy Tester → configure and StartThe tester separately synchronizes required history

Why isn't there a universal historical-data download button? The available price history is associated with the connected trading server. A different server or symbol may expose different dates and ticks. If the server does not hold a desired period, the Request function cannot manufacture genuine records for it.

How MT5 Strategy Tester Downloads History

Manually downloading price history is optional preparation, not a mandatory step before every EA test. The desktop Strategy Tester automatically checks for the history it needs when a test starts. It downloads M1 bars and available tick records from the trading server to the terminal, then copies the relevant history to a local testing agent. Depending on the selected mode and available ticks, the agent either uses actual tick records or generates a sequence from minute bars.

To run a test, press Ctrl+R, choose the EA, exact symbol, timeframe, date interval and a modeling mode. If the tester needs a second currency pair or additional history for an indicator, it can pause to synchronize those records. A temporarily slower first test can therefore be normal.

The tester also needs warm-up history before the requested start date so indicators and time-series calculations have previous bars. If insufficient history is available, the effective start date may move forward. Inspect the tester Journal for notices that the start time changed or for missing-history errors; never report performance for a different interval than the one the tester actually processed. MetaTrader documents these preloading and start-date rules in How the Tester Downloads Historical Data.

Practical example: You request an EA test from January 1, but the server has adequate price history only beginning later in January. The tester may have to shift the effective start or fail for a specific dependency. This is a data-coverage problem, not evidence that the EA is good or bad. Resolve the date-range issue before comparing performance.

Keep the distinction clear: automatic tester history synchronization supplies the simulation; the Export button simply creates an external file for inspection or analysis. For detailed Strategy Tester setup, consult MetaTrader’s Strategy Testing guide.

For the complete testing workflow after history has synchronized, see how to backtest an EA on MT5.

Where Is the History Center in MT5?

Searches for "MT5 History Center" often mix instructions for two different MetaTrader versions. In MetaTrader 4, the traditional History Center is associated with Tools → History Center (often F2). That MT4 procedure should not be copied into an MT5 guide.

In MetaTrader 5, the documented route for managing the broker's downloadable price history is Market Watch → Symbols → Bars/Ticks, using Request and Export. The relevant dialog can be opened through Market Watch or with Ctrl+U.

MT4 and MT5 price-history controls are different
PlatformHistory routeAvoid this mistake
MetaTrader 4Tools → History CenterDo not assume MT4 menus describe MT5
MetaTrader 5Market Watch → Symbols → Bars / TicksUse Request to retrieve price data; not an MT4-style History Center

If you encounter a guide claiming to export MT5 prices via an MT4 menu, compare it with the current official MetaTrader 5 instructions. Also distinguish the MT5 Toolbox History tab, which displays account transactions, from historical market prices.

MT5 Real Tick Data vs Generated Ticks

A tick is a time-stamped change to a quoted price or related market field. For intrabar strategies, the sequence and Bid/Ask spread may matter: a pending order could be touched between candle closes, and a widened spread may change the simulated result.

The Strategy Tester can use real ticks supplied by the broker or model ticks based on one-minute data. According to MetaTrader's technical explanation, real-tick mode uses observed quote records when available; if a minute has a bar but its real ticks are absent, the tester can generate ticks for that interval. This makes it incorrect to treat the phrase real ticks as a guarantee that every modeled moment contains a genuine observed quote.

Historical-data behavior in common MT5 testing modes
ModePrice sequenceWhat to remember
Open prices onlyPrimarily bar-open eventsFast preliminary checks; not suitable for many intrabar-sensitive strategies
1 minute OHLCOpen, high, low and close control points from M1 barsDoes not reproduce every observed market tick
Every tickGenerated ticks based on M1 historyMore detailed modeled movement, not recorded tick-by-tick history
Every tick based on real ticksBroker-provided ticks where available, with documented fallback in gapsOften most informative for intrabar behavior, but not a live-fill guarantee

Which mode is best? It depends on the EA's decision frequency and strategy. A program that only checks bar-open signals may initially be evaluated using a faster mode. One using tight stops, intrabar triggers or spread-sensitive logic deserves more granular testing and careful checks for available tick coverage. Comparing two modes on the same interval can help reveal sensitivity to the price path, but neither removes execution risk.

Real tick files are larger and may take longer to download. They do not automatically capture all future liquidity, latency, requotes, commissions or order-fill behavior. Treat the results as simulations, not live trading records.

How to Export MT5 Historical Data to CSV

To save a file of MT5 historical bars or ticks, use the Export control inside the Symbols → Bars/Ticks dialog after you have requested the data. This is the historical-data export described by MetaTrader. The Market Watch → Export command on the main quotes list serves a different purpose: it saves the currently displayed quote snapshot, not an entire history series.

  1. Open Market Watch → Symbols and select the correct instrument.
  2. Open Bars or Ticks, then click Request to load the available data.
  3. Review the visible rows and press Export; select a file location and save the CSV.
  4. Open the exported file with a compatible spreadsheet or data tool and verify that dates, prices and separators have been parsed correctly.
  5. Keep an untouched copy of the original export before adjusting timestamps, filtering rows or attempting to import the data elsewhere.

Bars and ticks do not have the same fields. A bar typically records OHLC values and volume-related information; tick exports can include individual time stamps, Bid, Ask, Last, volume and change flags. Do not treat a CSV of hourly bars as an accurate tick-by-tick replay file.

Check your time zone: Quote timestamps commonly follow the trading server's conventions, which may differ between data providers. If you combine sources, document each source and normalize time zones carefully. An apparent gap or price mismatch can be a timestamp or instrument-specification difference rather than missing market activity.

CSV files are useful for archiving, independent calculations and data inspection. Exporting a file does not automatically create a valid data set for importing into a standard broker symbol; the supported external-data route is through custom instruments.

How to Import Historical Data Using Custom Symbols

If you have historical rates from another provider and want to test them in MT5, first create a custom financial instrument. MetaTrader does not provide the same general price-history import control for a normal broker-managed symbol; the documented import function is for custom symbols.

  1. Prepare the file. Examine whether it contains M1 bars or ticks, its date and time format, time zone, numerical formatting and required columns. Check for duplicated timestamps, impossible prices and large missing periods.
  2. Create a custom symbol. Open Market Watch → Symbols and select Create Custom Symbol. Set a distinctive name and inspect its specification. You may copy suitable settings from an existing instrument, but confirm digits, point size, calculation mode, currencies and trading sessions for the intended market.
  3. Open the custom symbol's history. Select the custom instrument and its Bars or Ticks tab. Choose Import, then select the source file.
  4. Match the file columns. Adjust the separator, skipped rows or columns, and any time shift as needed. Use the preview to ensure each timestamp and value lands in the correct field.
  5. Import and inspect. Confirm the imported period and spot-check the first, middle and last records. On tick imports, the data must be in chronological order.
  6. Test the custom symbol. Select the new symbol in Strategy Tester, run a small validation interval and check the Journal for data or contract-specification issues.
MetaTrader custom-symbol import data requirements
History fileCore columns in MetaTrader's documented exampleCommon issue
Minute barsDate, Time, Open, High, Low, Close, TickVolume, Volume, SpreadImporting H1-only records leaves missing M1 intervals
Individual ticksDate, Time, Bid, Ask, Last, VolumeOut-of-order ticks, missing quote sides or incorrect timestamps

Different source-file separators can be mapped in the import dialog. MetaTrader also supports a time shift in hours, but shifting does not correct a data set with inconsistent daylight-saving or source-time conventions. Its custom financial instruments guide provides the supported sample file layouts and import settings.

Critical limitations: The imported time interval replaces any existing custom-symbol data for that interval; keep a backup. Higher-timeframe-only imports may leave gaps at shorter periods. Custom symbols are usable for charts and strategy testing, not for executing real trades. For advanced optimization, MetaTrader also restricts MQL5 Cloud Network use with custom symbols. This is a research feature, not a way to overwrite a broker's quote history.

How to Fix No History Data in MT5 Strategy Tester

If MT5 reports "No history data", stops at the wrong start date or returns an unexpectedly short backtest, begin with the test setup and the tester Journal. The underlying issue may be missing records, a symbol mismatch, insufficient earlier bars, the selected date interval, or a custom-symbol import problem.

MT5 missing historical data: practical diagnostic checklist
SymptomPossible causeFirst check
Requested symbol has no dataWrong instrument variant or no server connectionConfirm account/server, show symbol in Market Watch, inspect Symbols → Bars/Ticks
Test begins later than expectedInsufficient warm-up history before startRead Journal for a start-date adjustment; review server coverage
Real-tick request has shorter coverageServer has fewer actual tick records than barsCheck Bars and Ticks separately; do not assume equal depth
Multicurrency EA cannot initializeAdditional symbol or timeframe history is unavailableEnable required symbols and inspect tester Journal messages
Imported custom history behaves oddlyBad CSV mapping, duplicate bar times or inconsistent contract settingsInspect import preview, OHLC integrity, timestamps and symbol specification
History request is very slowLarge tick volume or connection/storage limitationsCheck connection, disk space and available interval before retrying

A sensible troubleshooting sequence is: verify the exact symbol and server; inspect available Bars and Ticks; try a smaller test range within the available history; confirm the testing mode; and read the Journal. Avoid deleting terminal data folders, importing unverified quotes over research files or randomly changing the EA just because a download is slow.

In custom-symbol tests, remember that contract properties, trading sessions and currency conversion symbols affect whether a trade can be simulated sensibly. The official custom-symbol guide documents related restrictions. If the data coverage is truly absent on the connected server, an MT5 setting cannot turn that missing period into genuine broker-observed quotes.

How to Check Historical Data Quality Before Backtesting

Good data checks are more informative than an isolated percentage. MT5's History Quality in a testing report evaluates the consistency of available M1 bar history, including gaps and incorrect minute records; it is not a direct measurement of the percentage of genuine historical ticks and is not a prediction of future execution accuracy. The official testing report help describes the calculation.

A data-quality checklist for MT5 EA research
QuestionWhat to inspectWhy it matters
Is the historical interval complete?Oldest/newest dates, unexpected weekday gaps and Journal noticesIncomplete coverage changes the sample you are testing
Are the bar values plausible?Open/high/low/close relationship, duplicate minutes and isolated price spikesBad input can create fictional triggers and drawdowns
Are timestamps consistent?Server time, time zone, seasonal clock changes, candle boundariesA session-based EA may react differently after a time shift
Is the symbol specified correctly?Digits, tick size, point value, spread, contract size, sessionsA mismatch can distort stops, position sizes and P/L
Does the EA need real ticks?Available tick range and modeling mode used in the reportGenerated sequences may hide path-sensitive differences
Are transaction costs realistic?Bid/Ask spread, commissions, swaps and delay assumptions where availableGross-looking backtest gains may disappear after costs

When inspecting a report, check History Quality, effective test dates, the number of bars and ticks, and any Journal warnings. A score of 100% can describe internally consistent minute-bar history while important sources of live divergence remain, including variable spreads, market depth, execution delays, slippage, liquidity and changing market conditions.

For example, two data sets might both pass a minute-bar consistency check but contain different tick streams or quote spreads. A short-horizon EA could produce different outcomes on them. Better validation compares a sensible historical interval, consistent settings, alternate test modes when appropriate, and an untouched period or demo observation before considering real trading.

The data checks are only one part of evaluating a result. Our guide to MT5 backtest reports explains how to read History Quality alongside drawdown and performance metrics.

FXGlory Historical Data vs MT5 Testing Data

FXGlory also provides a publicly accessible EUR/USD Historical Data page in its market section. It displays a timeframe selector, date range, tabular past prices and a Download option. This can be useful when reviewing how a currency pair's historical price bars are presented outside MetaTrader 5.

Do not assume the site's download and the MT5 Strategy Tester use the same price series. A website's displayed OHLC bars are not automatically broker-server M1 bars, timestamp-aligned Bid/Ask tick records, or a ready-to-import MT5 custom-symbol file. Even when two sources label the same instrument EUR/USD, their server clocks, quote sources, aggregation and spread histories may differ. We have not established that the website download contains the exact columns or granularity needed for MT5 tick import.

For EA backtests, prioritize the history actually available from the MT5 server and symbol being tested. Use the FXGlory market page as a separate reference if useful; only use externally downloaded price data for a custom-symbol experiment after confirming its format, source and limitations against MetaTrader's import requirements.

If you intend to progress beyond historical testing, review FXGlory's published EA conditions. The current Helpdesk permits EAs on real accounts except scalper, news-trader and arbitrage EAs. Data downloads and strategy-testing features do not override those trading restrictions.

Historical-data preparation checklist

  • Confirm the correct MT5 server and the exact instrument name.
  • Use Symbols → Bars/Ticks → Request to inspect the available history before choosing a test interval.
  • Check how the tester loads a warm-up period and whether its Journal changes the effective start date.
  • Choose a modeling mode appropriate to the EA's price sensitivity and real-tick coverage.
  • Use CSV exports for review; use custom symbols, not a standard broker symbol, for external imports.
  • Review timestamps, data gaps, contract specifications and actual transaction-cost assumptions.
  • Keep website historical prices, platform historical prices, and account transaction history clearly separate.

Bottom line: Reliable MT5 backtesting begins with knowing which price history the terminal has loaded, what the tester models, and what the data cannot tell you. More bars or a higher quality percentage do not guarantee a more profitable Expert Advisor or future trading results.

For the wider context of rule-based trading systems and why historical results have limits, return to our automated forex trading overview.

Frequently Asked Questions

How do I download historical data in MT5?

In the desktop terminal, open Market Watch (Ctrl+M), select Symbols (Ctrl+U), choose the instrument and open Bars or Ticks. Click Request to fetch the history available from the connected server, or to display data already cached. Click Export in that same tab to save it as CSV.

Where is the History Center in MetaTrader 5?

The familiar Tools → History Center instruction is for MetaTrader 4. In MT5, use Market Watch → Symbols → Bars or Ticks to request and export historical market prices. The Toolbox History tab contains account transactions, not chart-price history.

Does MT5 download historical data automatically for backtesting?

Yes. When an EA test starts, Strategy Tester synchronizes needed M1 bars and available ticks from the connected trading server and prepares testing-agent history. It may also require bars before the chosen start date, and it can shift the effective start forward if coverage is insufficient. Check the Journal.

How do I download real tick data in MT5?

In desktop MT5, open Market Watch → Symbols, choose the instrument, go to Ticks and select Request. You can export the available records as CSV. The depth and completeness of real tick data are determined by the source server; no setting can guarantee complete real ticks for all dates.

Can I export MT5 historical prices to CSV?

Yes. After requesting historical Bars or Ticks in the Symbols dialog, select Export. This is different from the Market Watch quote-list Export command, which saves a snapshot of currently displayed quotes.

Can I import my own historical CSV into MT5?

Yes, for custom symbols. Create a custom symbol in the Symbols dialog, use its Bars or Ticks tab and the Import action, then map the file columns and timestamps. MetaTrader does not offer the same external price-history import route for an ordinary broker-managed symbol.

Why does MT5 Strategy Tester say No history data?

Common causes include an unavailable symbol, incorrect connected server, missing bars for the selected interval, inadequate warm-up history, missing data for a second symbol, or a flawed custom-symbol import. Check the tester Journal, symbol specification, date range and Symbols → Bars/Ticks coverage before changing the EA.

Does 100% history quality mean my MT5 backtest is accurate?

No. MT5 History Quality evaluates the consistency of minute-bar historical data, not the share of genuine ticks or the realism of future execution. Even complete, internally consistent price history cannot eliminate spread changes, slippage, liquidity gaps, strategy overfitting or market regime changes.

Is FXGlory website historical data the same as MT5 tick history?

Not necessarily. FXGlory’s EUR/USD historical-data webpage displays past price bars, but the format, quote source, tick granularity and time zone may differ from the history associated with a particular MT5 server. Inspect the file before considering custom-symbol research; do not assume it can be used directly as an MT5 tick feed.

Related Contents

FXGlory EUR/USD Historical DataView FXGlory’s public historical price-bar information as a separate reference.
MetaTrader 5: Downloading Price HistoryOfficial procedure for requesting bar and tick history and exporting it.
MetaTrader 5: Tester Historical Data PreparationOfficial explanation of history synchronization and test-start requirements.
MetaTrader 5: Custom Financial InstrumentsOfficial instructions for importing external bar or tick data into custom symbols.
FXGlory EA Trading ConditionsRead the current real-account Expert Advisor restrictions.
MetaTrader 5: Real and Generated TicksOfficial documentation on real versus modeled tick streams.
MetaTrader 5: Testing ReportOfficial definitions for history quality and test-report fields.
FXGlory MetaTrader 5Explore the MetaTrader 5 platform available through FXGlory.

Explore MetaTrader 5 with FXGlory

Register with FXGlory to explore available MetaTrader and demo-account options. Check historical price-data coverage, account conditions and the current EA policy before considering live trading. Historical tests do not guarantee returns.

Register with FXGlory