How to Export MT5 Trade History (and Get It Into a Trading Journal)

MetaTrader 5 keeps every trade you have taken, but getting that history into a spreadsheet or journal is not obvious. Here is the exact path, the gotchas, and the shortcut.

· 7 min read
Table of contents
  1. Exporting from MT5 desktop
  2. Cleaning the report
  3. Importing into Profit AI
  4. MT4 is the same idea
  5. The shortcut: sync MT5 instead
Illustration of CSV trade rows flowing into a trading journal

There are three reasons to export MT5 history: moving to a new journal, auditing a prop firm challenge, or doing your own analysis in a spreadsheet. The terminal can do it, but the menu is hidden and the report needs a little cleanup first.

Exporting from MT5 desktop

  1. Open the Toolbox (View → Toolbox, or Ctrl+T) and select the History tab.
  2. Right-click inside the history and choose Positions. This groups fills into complete trades.
  3. Right-click again and pick the period: All History, Last 3 Months, or a Custom Period.
  4. Right-click once more, choose Report, then Open XML (MS Office Excel 2007). HTML also works if you prefer to open it in a browser.

Cleaning the report

The report is built for reading, not importing. It starts with account details, then lists Positions, Orders, and Deals, and ends with summary statistics. For a journal you want exactly one table.

  • Keep the Positions header row (Time, Position, Symbol, Type, Volume, Price, S / L, T / P, Time, Price, Commission, Swap, Profit).
  • Delete everything above that header and everything from the Orders section down.
  • The two Time and Price columns are open and close. Rename them Open Time, Open Price, Close Time, and Close Price so nothing is ambiguous.
  • Save as CSV (UTF-8). Check that numbers use a dot as the decimal separator if your spreadsheet is set to a different locale.

Importing into Profit AI

Choose Import a CSV in the journal. Profit AI detects known broker formats and maps columns automatically; if any column is not recognised, you map it by hand. You preview every row before saving, and re-importing the same file does not create duplicates.

MT4 is the same idea

In MT4, open the Account History tab, right-click to choose the period, then Save as Report (HTML) or Save as Detailed Report. Open the HTML file in Excel or Google Sheets, keep the closed-transactions table (it has Ticket, Open Time, Type, Size, Item, Price, S / L, T / P, Close Time, Price, Commission, Taxes, Swap, Profit), and save it as CSV.

The shortcut: sync MT5 instead

Exports are fine for a one-off. For a journal you keep using, you would repeat this every week. Profit AI syncs MT5 accounts directly with your account number, server, and investor password. That password is read-only by design: it can see history but cannot place trades. Prop firm accounts on MT5, such as FTMO, connect the same way.

FAQ

Frequently asked questions

In the Toolbox History tab, right-click, choose Report, and save it as Open XML (MS Office Excel 2007).

Profit AI Research portrait

About the author

Profit AI ResearchTrading Research Team

Profit AI Research is the in-house team behind the analyses, journal models, and Trader Score methodology used by 200,000+ traders. The team combines active discretionary traders, quantitative researchers, and ML engineers focused on price action, market structure, and prop-firm risk modeling.

More from Profit
Keep reading
Get started

Trade smarter.
Starting today.

Join 200K+ traders making smarter moves with real-time AI analysis, intelligent journaling, and a personal AI mentor.