# How to Export Trade History from MT5

> MT5 trade history export works differently from MT4. Here is the correct process for getting your closed trade data out of MetaTrader 5.

**Tags:** mt5, export, trade-history, csv
**URL:** https://traderjournal.app/metatrader/how-to-export-trade-history-from-mt5

---


# How to Export Trade History from MT5

MT5's history export process is similar to MT4 but with some differences due to the deal/order/position model. Here is the step-by-step process.

---

## Accessing History in MT5

MT5 separates history into three views:

- **History tab** - your closed positions (this is what you want for trade analysis)
- **Deals** - individual deal executions (more granular, includes partial fills and partial closes)
- **Orders** - the order instructions that generated the deals

For journaling and performance analysis, use the History tab (closed positions).

---

## Exporting from the History Tab

1. Open MT5 and connect to your account
2. Open the Toolbox (Ctrl+T)
3. Click the History tab
4. Set the date range using the dropdown in the top-left of the tab (Today, Last Week, Last Month, Last 3 Months, Custom)
5. Right-click anywhere in the history list
6. Select "Save as Report" to export as HTML

For MT5, there is often a more useful option: "Export to XML" or "Export Positions" which produces a structured file that is easier to import than the HTML report.

---

## Getting Clean CSV Data from MT5

MT5 does not always produce clean CSV directly. Options:

**Via the built-in export:** Some MT5 builds include an "Export to CSV" option in the right-click menu of the History tab. If yours does, use it.

**Via HTML to Excel:** Open the HTML report in Excel (File > Open, select the HTML file). The trade table will import as a worksheet. Save as CSV from there.

**Via the Toolbox copy:** Select all rows in the History tab (Ctrl+A), right-click, Copy. Paste into Excel. This pastes tab-delimited data that can be saved as CSV.

---

## The Deal vs Position Data Distinction

For simple hedging account trading (one position per trade), the History tab shows position-level data that maps cleanly to trade records.

For netting accounts or complex position management with partial closes, the History tab may show multiple rows for what was functionally one trading thesis. For deep analysis, you may want the Deals export to see the full sequence of fills.

For most journaling purposes, the Position-level history is sufficient.

---

## Automation vs Manual Export

The same practical consideration applies to MT5 as to MT4: manual export solves the historical backup need but does not solve the ongoing data capture problem.

Trader Journal's MT5 EA uses OnTradeTransaction to sync trades immediately on close, eliminating the need for recurring manual exports. Set it up once and your journal stays current automatically.

Download at android.traderjournal.app or ios.traderjournal.app.