Export chart data from MT5 to CSV: bars, ticks and limits

Price data and trade history are different things. Here is how to get a symbol's bars out of the terminal and what to watch for.

Two very different things are called history in MetaTrader 5: the record of your own trades, and the price data of a symbol. People searching for how to export data from the platform often want the second, and the answers they find are about the first. This page covers price data: how to get the bars of a symbol out of the terminal into a CSV file, what limits to expect, and how it differs from exporting your trade history.

Price data versus trade history

Price data (bars, ticks)Trade history (your deals)
What it isOpen, high, low, close and volume of a symbolYour orders, deals and positions
SourceThe broker's price feedYour account
Where in MT5Symbols window, Bars and Ticks tabsHistory tab of the Terminal window
Typical useBacktesting, charting in Excel or PythonReviewing your own results

If what you need is your own trades, go to how to export MT5 trade history. If you want the candles of XAUUSD for the last year, keep reading.

Export bars from the Symbols window

Open the Symbols window from the View menu or with Ctrl+U. It lists symbol groups on the left. Choose the Bars tab, select the symbol, pick the timeframe and set the date range, then use the Request button so the terminal loads the data. Once the bars appear, the export option lets you save the loaded bars to a CSV file. Choose the folder and name, then open the file in a spreadsheet or a script. The exact button names and tab layout can differ between builds and brokers, so check your own terminal. The Ticks tab works in the same way for tick data, but the files are much larger.

What limits the data you get

The server time point matters more than most beginners expect. The timestamps in an export are in the broker's server time, not your local time. The page on MT5 server time shows how to read it.

Open the CSV without breaking it

A few habits avoid the usual problems. Open the file through a data import rather than double-clicking if your spreadsheet converts dates in the wrong order. Check the separator: depending on your regional settings a CSV may use commas, semicolons or tabs. Keep the original untouched and work on a copy. If you load it in Python with pandas, specify the separator and parse the date column explicitly. A quick check that the first and last rows match the chart saves a lot of confusion.

A worked example (hypothetical)

A trader wants to see how far gold usually moves in the first hour after the London open, using their own broker's data. They request the one-hour bars of XAUUSD for six months in the Symbols window, export to CSV and open it in a spreadsheet. A new column calculates high minus low for each bar. They filter to the rows with a server time of the first hour of the session and take the average. The result is a number in dollars per ounce they can compare with the stops they usually use. It is not a forecast, only a description of the past on one broker's feed, and the answer depends on the server time zone they identified first.

Putting price data next to your trades

The most useful reason for a trader to export bars is context. With the candles in one sheet and the trades in another, you can ask whether your entries cluster at the highs of the bar, whether your stops sit inside the typical range, and how a losing day compares with normal volatility. For that you need both: price data from the Symbols window and your trade history from the History tab or from your journal. The page on history deals in Python shows the programmatic route to the trade side. A tool like AI Trading Journal covers the trade side, reading closed positions from your MetaTrader 5 history into a journal on your PC with a P&L calendar and an Excel report. It does not use or store price data.

Other ways to get price data

Scripts and indicators from the MQL5 community can write bars to files, and the Python package for MetaTrader 5 can request rates directly. These need installation and some technical comfort, and quality varies, so read the code or the description before running anything on a live account. Downloading data from third-party providers is another option, but it will not match your broker's feed. For checking your own trading against your own broker, the Symbols window export is the simplest source.

Limits

Price data and trade history are different things. MT5 price history vs account history explains which one a journal uses.

Frequently asked questions

How do I export chart data from MetaTrader 5?
Open the Symbols window, choose the Bars tab, select the symbol, timeframe and dates, request the data and use the export option to save a CSV file.
Is this the same as exporting trade history?
No. Price data is the symbol's candles. Trade history is your own deals and lives in the History tab.
Why does my export have only a few months of data?
The broker decides how much history the server provides, so the depth varies.
Which time zone is in the file?
The broker's server time, not your local time.
Does the journal app use price data?
No. It reads your closed trades from the account history only.

Related guides

Looking for your own trades, not candles? Journal them free for 7 days

Free for 7 days, no card required. After that, a one-time $19.99 purchase. No subscription. Also on the Microsoft Store.

One-time $19.99, no monthly fee · your MT5 login never leaves your PC · trades go into your own journal on your PC, not through our servers.

Start free 7-day trial