How to Export Your MT5 Trade History (CSV and HTML), Step by Step

Quick answer

In MetaTrader 5, open the History tab of the Toolbox window, right-click, choose the view (Positions, Orders or Deals) and a period such as All History, then right-click again and pick Report to save the file. For a journal, Positions gives one row per trade, while Deals shows every individual fill. Menu wording can differ slightly by build and broker.

Key takeaways
  • The export lives in the History tab of the Toolbox window; the view you pick (Positions, Orders or Deals) decides what the file contains.
  • MetaTrader 5 help states a position is included in a report only if its opening date or closing date falls inside the selected period, so a long trade can vanish from a narrow range.
  • One order can create several deals, so a Deals export can have more rows than you made trades.
  • Export All History once, keep the file, and filter by date inside your journal instead of exporting month by month.
  • Check the time zone of the file against your journal before you import; the platform's own help does not say which zone it uses.
In this article
  1. Where is the trade history in MT5?
  2. Positions, orders or deals: which view should you export?
  3. Worked example: one order, two deals, one position
  4. How do I export the report, step by step?
  5. What is the date-range trap in MT5 reports?
  6. What else goes wrong in MT5 exports?
  7. How far back does MT5 history go, and how often should you export?
  8. What do the columns mean in an MT5 Positions report?
  9. Which export should you use for a journal?
  10. Quick checklist before you import
  11. The short version

To export your MT5 trade history, open the History tab of the Toolbox window, right-click inside it, choose the view you want (Positions, Orders or Deals) and a period such as All History, then right-click again and save a Report. The part that trips people up is not the menu. It is choosing the right view, because MT5 stores the same trade three different ways and only one of them looks like a trade log.

This guide gives the menu path, explains the three views with a worked example, covers the date-range rule that silently drops trades, and ends with what to check before you load the file into a journal. Where I could not confirm a step on a platform or broker page, I say so. MetaTrader 5 is built by MetaQuotes but each broker ships its own build, so menus can differ by version.

Where is the trade history in MT5?

It is in the History tab of the Toolbox window, which many builds label Terminal at the bottom of the screen. MetaTrader 5’s own help says to open the History tab of the Toolbox window, and that executed orders and their deals are added there after a trade.

If the panel is hidden, use the View menu to show the Toolbox (the shortcut is usually Ctrl+T, but confirm in your build). The tab shows nothing useful until you pick a period, so the first job is always the same: right-click and choose the range.

Positions, orders or deals: which view should you export?

For a journal, export Positions. It gives one row per trade, which is what a journal counts. Use Deals when you need every individual fill, and Orders when you need the trade requests, including ones that never filled.

MetaTrader 5 help describes the views as a list of positions, a list of orders (“all trade requests sent to a broker”), a list of deals (“the actual purchase and sale transactions executed based on the orders”) and a tree view of all trading operations. The MQL5 article on orders, positions and deals adds the key rule: each deal is based on one order, but a single order can generate a set of deals.

View One row is Best for Watch out for
Positions A position from open to close, with weighted average prices and total result Journals, win rate, R-multiples Needs the period rule below
Deals One executed transaction Partial fills, exact cost and slippage work More rows than trades; balance rows may appear
Orders A trade request, filled or not Seeing stop and limit orders, cancelled orders Not a profit record

Worked example: one order, two deals, one position

Say you send a market buy for 0.50 lots EURUSD and the server fills it in two pieces. This is a hypothetical example with round numbers.

Deal Lots Price
1 0.30 1.0850
2 0.20 1.0852

An Orders export shows 1 row. A Deals export shows 2 rows. A Positions export shows 1 row with a weighted average entry:

Average entry = (0.30 × 1.0850 + 0.20 × 1.0852) / 0.50 = 0.54254 / 0.50 = 1.08508

If you count rows in the Deals file as trades, you count this trade twice and halve its size in your average. Positions avoids that. Add a later partial close and the Deals file grows again while Positions stays one row.

How do I export the report, step by step?

Right-click in the History tab, choose the view and period, then right-click again and pick Report. The sequence below follows MetaTrader 5’s help and a journal vendor’s published MT5 export steps.

  1. Open the Toolbox and click the History tab.
  2. Right-click in the tab and choose the view. Pick Positions for a journal.
  3. Right-click again and choose a period: All History, Last 3 Months, Last Month or a custom range.
  4. Right-click once more, choose Report, then the format offered, usually HTML.
  5. Save the file somewhere you will find it, and keep the original untouched.

MetaTrader 5 help says only that a report “can be saved as a file and shared with other traders or analyzed using external software” and does not list formats. Broker and journal guides describe HTML, and some mention an Excel-compatible XML option. I could not confirm a native CSV option on a MetaQuotes page, so if you need CSV, open the report in a spreadsheet and save it, or use an MQL5 script. The same TradeZella guide notes the HTML must be in English, which you set under View, then Languages. That is that importer’s requirement, but any importer that reads headers will break on translated headers, so exporting in English is a safe default.

What is the date-range trap in MT5 reports?

A position appears in a report only if its opening date or closing date falls inside the selected period, according to MetaTrader 5 help. A position opened before the period starts and closed after it ends is excluded.

Example, hypothetical dates. You hold a gold trade from March 20 to April 10.

Period you export Includes the trade? Why
March 25 to April 5 No Opened before start, closed after end
March 1 to March 31 Yes Opened inside the range
April 1 to April 30 Yes Closed inside the range
All History Yes Everything is inside

The consequence is double counting when you stitch monthly files together: the March and April exports both contain that trade. Either export All History once, or deduplicate on the position ID after combining files. Exporting All History and filtering inside your journal is simpler and safer.

What else goes wrong in MT5 exports?

Four things recur: balance rows, time zones, symbol suffixes and account modes. Each changes your numbers without any error message, which makes them worse than a failed upload.

  • Balance rows. Deposits, withdrawals and credits can show up as rows with no symbol. They are not trades. Delete them or filter them before computing statistics.
  • Time zone. The MT5 help pages I read do not say which time zone report timestamps use. Brokers commonly use a server time that differs from your local time, so compare one trade’s time with your own record before importing. The CSV troubleshooting guide shows how to test this with a single known trade.
  • Symbol suffixes. Brokers add suffixes such as .m or .pro. A journal may treat XAUUSD and XAUUSD.m as different instruments unless it maps them.
  • Account mode. The MQL5 article describes netting-style behavior with one open position per symbol. Whether your account nets or hedges is set by the broker, and it changes how many position rows you see for the same activity.

How far back does MT5 history go, and how often should you export?

The terminal can only show what your broker’s server still holds, and it may need to request older records when you widen the period. The MQL5 article notes that narrowing the displayed period does not delete stored history, while widening it can make the terminal request deeper history from the server. How long a broker keeps old deals is the broker’s policy, and I found no platform page that states a universal limit.

So the safe habit is to export on a schedule instead of waiting until you need the data. A monthly export of All History, saved with the date in the filename, protects you if a broker migrates servers, archives an inactive account or closes it. Treat the exported file as your own copy of the record. It also gives you something to compare against if a number in your journal ever looks wrong.

When What to export Why
First time All History, Positions Builds your full baseline
Each month All History, Positions Catches trades still open at month end
Before closing or switching an account All History, Positions and Deals You may lose access afterwards
When a number looks wrong Deals for the date in question Shows each fill behind the position

What do the columns mean in an MT5 Positions report?

Exact column names vary by build and language, so read the header row of your own file before you map anything. In general a Positions row carries the open time, a position or ticket number, the symbol, the type (buy or sell), the volume in lots, the entry price, stop loss, take profit, the close time, the close price, commission, swap and profit.

Three of those deserve attention. Swap is the overnight financing charge or credit, so a trade held across several nights has a different net result from the same price move intraday. Commission may be zero on spread-only accounts and large on raw-spread accounts, which changes your real results. Stop loss and take profit may show the final levels rather than the ones you started with, so check whether a stop moved to breakeven now looks like a tight plan. If you want to study risk, record the original stop in a note at entry.

Which export should you use for a journal?

Use the Positions report in the widest period, once, then import it. If your journal needs partial fills, add the Deals report as a second file rather than replacing the first.

A practical rule: one source of truth. Pick one export type, keep the raw file, and note the date you exported. If you move between platforms, the same logic holds in the MT4 export guide and the cTrader history guide. If you trade Exness accounts, the Exness trade history guide covers the broker-specific routes. High-volume traders should also read how to log many trades a day without burning out, because an export is what makes that volume manageable.

If you want a journal to read the file for you, Pips Decoded recognizes the MT4 and MT5 CSV layouts and has a time-zone setting for the file; the free plan holds up to 30 trades a month, so you can test an import before paying anything. See pipsdecoded.com for current limits.

Quick checklist before you import

  • Confirm the view (Positions for a journal) and the period (All History).
  • Open the file and look for rows with no symbol; remove them.
  • Compare one trade’s open time with your own record to find the time-zone offset.
  • Check the row count against what you remember: far more rows than trades means you exported Deals.
  • Keep the original file unedited and work on a copy.

This article is educational and is not financial advice.

The short version

  • Export from the History tab of the Toolbox: right-click, choose the view and period, then Report.
  • Use Positions for a journal (one row per trade); Deals shows each fill and can double your row count.
  • A position is included only if its open or close date is inside the period, so export All History once.
  • Remove balance rows and verify the time zone before you import.
  • If a menu differs on your build, follow the principle: pick the view, pick the full period, save the report.

Sources

Frequently asked questions

How do I export my trade history from MT5?

Open the History tab in the Toolbox window at the bottom of the terminal, right-click, pick the view you want and a period such as All History, then right-click again and choose Report. MetaTrader 5 saves the report as a file you can open or upload. Exact menu wording can vary by build.

Can MT5 export trade history to CSV?

The built-in Report option documented by MetaTrader offers a saved report file, and guides from brokers and journals describe HTML and an Excel-compatible XML option. A plain CSV is usually produced by converting the report in a spreadsheet or by an MQL5 script. Check which formats your own build offers.

What is the difference between positions and deals in MT5?

A deal is one executed transaction, and one order can generate several deals. A position is the open contract on one symbol built from those deals, from opening through partial and full closing. For a journal, a position is closest to what most traders call a trade.

Why are some of my trades missing from the MT5 report?

MetaTrader 5 help says a position is included only if its opening date or closing date falls inside the selected period. A trade opened before the period starts and closed after it ends is left out. Select All History or widen the range to include it.

Does the MT5 history export include deposits and withdrawals?

Balance operations such as deposits can appear as separate rows depending on the view and report you choose, and they are not trades. Remove or ignore them before you calculate win rate or profit factor, or your statistics will be wrong.

Keep reading

Written by the Pips Decoded editorial team and last updated November 13, 2026. We cite the sources we opened and recompute every example. Pips Decoded sells a trading journal, so read our product mentions with that in mind. How we write and check articles. This article is educational and is not financial advice.