How to Export MT5 Historical Price Data to CSV and Excel

How to Export MT5 Historical Price Data to CSV and Excel

To export MT5 historical price data, use the desktop platform's symbol history controls, then check the CSV before analysing it in Excel. This guide covers chart bars and ticks. If you need your own orders, executions or account statement, use our MT5 trade-history and report-export guide instead.

Choose the data your question requires

Write down the instrument, intended date range and purpose before downloading. “Compare hourly closes” requires a different dataset from “inspect changes in the quoted spread”. Keep the exact broker symbol, including any suffix, in your notes.

  • Bars: period summaries containing open, high, low and close prices. Tick volume counts incoming ticks; trade volume is a different measure and may be unavailable for OTC instruments.
  • Ticks: individual price updates. Bid, Ask and Last are distinct fields; Last refers to the last deal price. A row need not mean that every field changed.

See MetaQuotes' price-data explanation and tick-field reference. Do not label tick volume as your traded lots.

Download Bars or Ticks and export a CSV

  1. In desktop MT5, open the Market Watch context menu and choose Symbols.
  2. Select Bars or Ticks, confirm the instrument and, for bars, the required timeframe. Review the available date controls.
  3. Click Request. After data appears, choose Export to save the CSV.

The download comes from the broker's server; it is not a promise of a complete, identical history across brokers. These are the documented desktop steps; labels may differ by interface language.

Start with a small sample. Keep the original file unchanged and record its first timestamp, last timestamp and row count in a separate worksheet. A useful filename includes symbol, timeframe or “ticks”, and export date.

Exporting the current chart is a separate shortcut

For the active chart, use File > Save. The documented Ctrl+S shortcut also offers chart export, including CSV. Check the file's coverage rather than assuming it contains every date you wanted.

Do not confuse either route with Export directly on the Market Watch quote list: that saves a snapshot of its current values, not a historical series.

Import the CSV into Excel without changing its meaning

In supported desktop Excel versions, choose Data > From Text/CSV. Inspect the preview's delimiter and columns before loading. Use Transform Data when the preview needs correction; see Microsoft's import instructions.

  • Compare several raw lines with their imported cells. One long column usually calls for checking the delimiter.
  • Check date order and decimal separators before setting column types. Power Query can apply a specific locale during conversion.
  • Retain the original timestamps. Confirm their time-zone basis before combining them with another dataset; do not silently relabel them UTC or local time.

A small, invented quality-control example

Suppose a fictional hourly bar has Open 100.20, High 100.80, Low 100.10 and Close 100.50. After import, verify that 100.50 has not become 10050 or text. Check that High is at least the larger of Open and Close, and Low is no higher than either.

Then compare the first and last timestamps with your written request. Sort chronologically and flag repeated bar timestamps before calculating changes. These numbers are invented, not current prices or a DecodeFX download. The checks detect obvious import errors; they do not certify completeness or data accuracy.

What to check when dates or rows are missing

Compare the exact symbol, connection and requested scope. MetaQuotes notes that Max bars in chart limits downloaded bars, while tick downloads can be large. A gap should be investigated before it is filled with a copied price.

Record the missing interval and ask the broker whether data exists for that symbol and server. If the missing item is actually your own execution, follow the missing trade-history checklist.

Frequently asked questions

Is this an Excel account report?

No. It is a price-data CSV imported into Excel, separate from account statements and realised trading results.

Should I always choose Ticks?

Choose the detail needed for your question. Bars are easier to review for period comparisons; ticks need more careful field and file-size checks.

Does a clean CSV prove a strategy will work?

No. Correct import does not establish realistic execution or future performance. Leveraged CFD trading can result in substantial losses.

The cover is an illustrative data-analysis workspace photograph. Prices on the screen are not current quotes, and the image is not an MT5 interface demonstration.