How to export candles from MetaTrader 5
How to use Export Bars in MT5, which timeframes to choose, how much history you need, and why broker server time matters.
MetaTrader 5 can export your broker's candles as a file, one pair and one timeframe at a time. You can then use the data in a spreadsheet, a backtest or a trading journal such as Red Candle.
This guide covers the export steps and a few settings that can cause problems later.
How to use Export Bars
- In MT5, open View → Symbols or press Ctrl+U.
- Select your pair, for example XAUUSD, and open the Bars tab.
- Choose a timeframe and a date range, then click Request. The table fills with candles showing date, time, open, high, low, close and tick volume.
- Click Export Bars and save the file.
Repeat these steps for each timeframe you want.
The file is tab-separated text with a header line like <DATE> <TIME> <OPEN> <HIGH> <LOW> <CLOSE> <TICKVOL> …. MT5 sometimes saves it without a .csv extension, which is normal.
If you get fewer candles than you requested
MT5 only returns history it has already downloaded. If the table stops early:
- Scroll back on a chart of that pair and timeframe so MT5 loads older history, then click Request again.
- Check Tools → Options → Charts → Max bars in chart. A low value limits how much history MT5 keeps.
Which timeframes and how much history
This depends on how you plan to use the candles. For a trading journal, a good starting point is:
- H1 and H4 for trend and key levels.
- M15 if you take intraday entries.
- D1 for the longer-term picture.
Pattern searches need more history. Red Candle's Similar Patterns requires at least 300 candles of one timeframe, and more history gives more matches. To link chart screenshots, the candles only need to cover the dates of those screenshots.
Check your broker's server time
MT5 writes candle times in your broker's server time, not your local time. Many brokers use GMT+2 in winter and GMT+3 in summer so that the weekly open lines up with the New York close, but some use other zones.
If you import candles with the wrong time zone, they may look correct until you compare them with a screenshot and find a one-hour difference in some weeks.
To check the zone, compare the server time in MT5's Market Watch with UTC, or ask your broker. In Red Candle, you set it once under Market Data → Broker Server Time, and the app checks new files against it. See Broker server time for details.
Keep your data complete
- Update regularly. Export the newest range and import it. Candles you already have are merged, not duplicated.
- Fill gaps. If a range is missing, export only those dates and import them. Weekends, the daily break and US market holidays are normal pauses, not gaps.
- Use one file per pair and timeframe so each import is easy to check.
Key takeaways
- Go to View → Symbols → Bars → Request → Export Bars, and save one file per pair and timeframe.
- H1 and H4 are a good default. Add M15 and D1 as needed.
- Candle times use broker server time, so set the correct zone.
- Export again to update your data or fill gaps. Duplicates are merged.
Try it in Red Candle
Keep your checklist, daily limits and trading journal together on your computer.
Download AppContinue in the docs
Export bars from MetaTrader 5 →Import candles →Broker server time →Coverage, gaps and holidays →ⓘ Educational content, not financial advice. Trading involves risk, and past results don't guarantee future results.
Related articles
XAUUSD across the Asia, London and New York sessions
How gold usually behaves in the Asia, London and New York sessions, what tends to change between them, and how to record your trades by session.
Read article →Win rate vs. risk:reward: which number matters more?
A 40% win rate can make money and a 70% win rate can lose it. Learn how win rate and risk:reward work together, with break-even figures.
Read article →