PipFlo logo PipFlo
← All posts
How-to · 5 min read ·

How to import an MT4 or MT5 statement into a trading journal

Retyping six months of trades is the fastest way to abandon a trading journal before it tells you anything. Your broker already has every fill. The job is getting them out of MetaTrader and into something that can group them.

There is one wrinkle that trips almost everyone up on the first attempt, so it is worth saying immediately: neither MT4 nor MT5 exports CSV. MT4 gives you an HTML page. MT5 gives you XLSX or HTML. Most journals want CSV. That gap is the whole of this guide.

Exporting from MT4

  1. Open the Terminal panel — Ctrl+T if it is not already showing along the bottom.
  2. Click the Account History tab.
  3. Right-click anywhere in the list and set the period you want. All History is usually what you want the first time.
  4. Right-click again and choose Save as Detailed Report. The plain Save as Report also works; the detailed version just carries more per trade.
  5. Save it somewhere you will find again. You will get an .htm file.

That file opens in a browser and looks like a report, which is where people stop. It is a table, and a table can be converted.

Exporting from MT5

  1. Open the Toolbox — Ctrl+T again.
  2. Click the History tab.
  3. Right-click, set the date range, and make sure you are looking at Positions rather than Deals or Orders. Deals splits a single round trip into an entry row and an exit row, which imports as two half-trades and quietly doubles your trade count.
  4. Right-click and choose Report, then XLSX.
The one that matters
Positions, not Deals. This is the single most common way an MT5 import goes wrong, and because it produces plausible-looking rows rather than an error, it can survive a long way into your stats before anyone notices the trade count is twice what it should be.

Converting to CSV

Both formats convert in a spreadsheet. Nothing needs installing.

From MT5’s XLSX

Open it in Excel, Numbers or Google Sheets. You will find a header block of account details above the actual table — delete those rows so that the row with Time, Symbol, Type and so on is the first row in the sheet. Delete any summary rows at the bottom too. Then Save as or Download as CSV.

From MT4’s HTML

Open the .htm file in a browser, select the trades table, copy, and paste into a blank spreadsheet. Most spreadsheet apps will also open the .htm directly. Then the same cleanup: header block off the top, summary rows off the bottom, save as CSV.

The cleanup matters more than it sounds. Importers read the first row as column names, so if that row is “Account: 51234567” then nothing maps and the file looks broken when it is merely untidy.

The columns, and what they become

MetaTrader’s column names are consistent enough that a decent importer recognises them without being told. These are the ones worth keeping:

Open Time→ date
Symbol→ pair
Type→ direction (buy / sell)
Price (open)→ entry
Price (close)→ exit
Volume / Lots→ position size
S / L→ stop loss
T / P→ take profit
Commission→ fees
Swap→ swap
Profit→ P&L
Close Time→ exit time
Comment→ notes

Two practical notes. Delete the balance rows — deposits and withdrawals are not trades and will distort every statistic you look at afterwards. And if your account is not in your reporting currency, convert P&L before importing rather than after; almost nothing handles a mixed-currency history gracefully.

In PipFlo the mapping step is a screen of dropdowns with the columns already guessed from your headers, and only date and P&L are actually required — everything else improves the breakdowns without blocking the import. It remembers the mapping, so the second import from the same broker is one click. CSV import is a Pro feature; manual logging and the journal itself are on the free plan.

What an import cannot give you

This is the part worth being honest about, because it is the part that decides whether the journal is useful.

A broker statement records what happened. It has no idea what you were thinking. Nothing in that CSV tells you which setup you traded, whether you followed your own rules, or whether you sized up because the last one lost. Those are the fields that produce every insight worth having — and they are precisely the ones no export contains.

So an import gives you history, not a journal. It is genuinely valuable: you get an equity curve, a real win rate, your actual profit factor, and a drawdown figure that is a fact rather than a memory. What it cannot do is tell you why. For that you have to log decisions going forward, which is the argument in how to keep a forex trading journal.

The sensible pattern is both: import the back history once so you start with a real baseline instead of an empty screen, then log new trades properly from today.

Five things that go wrong

  • Deals instead of Positions on MT5. Doubles your trade count and halves your average result. Check the count against what you expect before trusting a single number.
  • Balance rows left in. A deposit imported as a trade is a large, fictional winner.
  • The header block left on top. Row one has to be column names or nothing maps.
  • Importing the same range twice. Most importers do not deduplicate. Import by date range and keep track of where you got to, or check the count afterwards.
  • Dates in an ambiguous format. 03/04 is two different days depending on the locale. MetaTrader uses YYYY.MM.DD, which is unambiguous — leave it alone rather than helpfully reformatting it in the spreadsheet.

Other platforms

The same shape applies to cTrader, TradingView, and most broker portals: find the trade history, export whatever it offers, strip everything that is not the table, save as CSV. The column names differ but the concepts do not, and any importer worth using lets you map them by hand when the guess is wrong.

If you only want the arithmetic before a trade rather than a record after it, the position size and pip value calculators are free and need no account.

Once it is in

Resist reading the numbers for a moment and check the import instead. Does the trade count match roughly what you remember? Does the net P&L agree with your broker’s? Is the earliest trade the date you expected? Five minutes of that is worth more than an hour spent interpreting statistics built on a file with the balance rows still in it.

Then look at the equity curve and the drawdown, because those two are the ones a statement can tell you honestly and memory cannot tell you at all.

Muhammad Zaman — Founder of PipFlo. Writes about trade review, journaling habits and reading performance data honestly.

Import once, then log the decisions

PipFlo maps MetaTrader's columns on sight and remembers the mapping. CSV import is on Pro; manual logging and the journal are free for your first 50 trades.

Start free