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 is | Open, high, low, close and volume of a symbol | Your orders, deals and positions |
| Source | The broker's price feed | Your account |
| Where in MT5 | Symbols window, Bars and Ticks tabs | History tab of the Terminal window |
| Typical use | Backtesting, charting in Excel or Python | Reviewing 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 broker decides how much history it provides. Some servers hold years of minute bars, others only a few months.
- The terminal downloads history on demand, so a symbol you have never opened may need a request first.
- The option for the maximum number of bars in a chart, found in the platform options, caps what a chart holds but not what the server stores.
- Different brokers have different prices and server times, so the same symbol exported from two brokers will not match exactly.
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
- Data depth and quality depend entirely on the broker.
- Exports are in server time and usually in the broker's price format, not an exchange standard.
- Menu and button names change between builds, so verify them in your terminal.
- Price data tells you what happened, not what will happen, and this page is not trading advice.
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?
Is this the same as exporting trade history?
Why does my export have only a few months of data?
Which time zone is in the file?
Does the journal app use price data?
Related guides
- A local trading journal for MT5
- P&L calendar for MT5
- Trade notes, ratings and screenshots
- Trading progress and goals
- Back up your journal and move it to a new PC
- An offline trading journal for Windows
- How to set monthly trading goals
- Import your whole MT5 history
- How to tag trades
- Trade screenshots for your journal
- All trading journal comparisons
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