MT5 history export problems in Excel: numbers, dates and extra rows

Zero totals, dates that sort wrongly and rows that are not trades are the usual signs of a messy export. Learn the cause and the fix for each one.

Exporting your history from MetaTrader 5 is simple until you open the file. The dates are text, the numbers use a comma where your spreadsheet expects a point, the columns are merged into a single cell, the symbol names carry suffixes, and some rows are not trades at all. These are the problems that turn a quick export into an hour of cleaning. This page lists the usual symptoms, why each one happens and how to fix it, so that the sheet you build can be trusted. It complements the basic steps in how to export MT5 trade history.

Which export you used matters

The terminal offers several ways to get history out. A report can be saved in a web page format or as a spreadsheet file from the History tab’s context menu, and rows can also be selected and copied, as described in sort, filter and copy rows. Menu names differ between builds, so check your terminal. Each route has its own quirks. A web page report opens well in a browser but can be awkward in a spreadsheet, while a copied selection is plain text separated by tabs.

Symptom one: numbers are treated as text

If a column is left aligned and sums come out as zero, the cells hold text. This happens when the number contains a space as a thousands separator, a non-breaking space or a decimal separator that does not match your spreadsheet locale. The fix is to replace the separator and convert the column to numbers. In a spreadsheet with a decimal comma setting, a value such as 1 234.50 will not be parsed, while 1234,50 will. Settle the locale first, then convert, and check by summing a column against the profit total shown by the terminal.

Symptom two: dates do not sort

Timestamps are written as year, month, day, hour, minute and second with dots, and some locales read them as text. If sorting puts a date from March before one from February, the sheet is sorting characters. Convert the column to a date and time type, or split it into a date part and a time part. Remember that the time is the broker’s server time, covered on MT5 server time, so a conversion to your local time must use the correct offset and, in the months that change, the correct daylight saving rule.

Symptom three: everything is in one column

When pasted text lands in a single column, the separator was not recognised. Use the text-to-columns feature and choose tabs, or paste into a sheet that splits on tabs by default. If a comma-delimited file opens as one column in a locale that uses semicolons, use the import wizard and name the delimiter yourself instead of double clicking the file.

Symptom four: rows that are not trades

Deposits, withdrawals, credits and adjustments are exported along with trades. They have no volume and no symbol, so they break averages. Filter them out before you compute win rate or average trade, and keep them on a separate tab to reconcile the balance. See rows that are not trades and dividend and adjustment rows.

Symptom five: one trade split over several lines

In a deals view, a partial close or a scaled position creates several rows for what you think of as one trade, as shown in partial closes in history. If you count rows, you count executions. If you want trades, group the rows by position ID, an identifier explained in deal, order and position IDs.

SymptomLikely causeCheck or fix
Sums are zeroNumbers stored as textFix separators, convert, compare to terminal total
Dates sort wronglyDate stored as textConvert to date type or split into parts
One wide columnWrong delimiterUse tab or the import wizard
Win rate looks too goodBalance rows includedFilter rows with no symbol
Trade count too highDeals counted, not positionsGroup by position ID
Symbols do not groupBroker suffixesMap variants to one name

A short checklist before you trust a sheet

A worked example (hypothetical)

A trader exports a month, opens the file and sees a profit total of zero. The cause is a thousands separator that is a space. After replacing it, the total becomes 480. Filtering out one deposit of 1,000 and one withdrawal of 300, which had been included, leaves 480 in trading results, and the balance change reconciles. The figures are invented but the order of steps is the useful part: fix the format, remove non-trades, group, then compare with the terminal.

When you want to avoid the cleaning

AI Trading Journal, a Windows app for MetaTrader 5 only, reads the closed history from the terminal on your own PC and keeps one entry per closed position, with partial closes combined, and the result as profit plus commission plus swap. It needs no export step and the journal is a file in Documents\AI Trading Journal. A report to Excel is produced from the journal with live formulas. The app is read-only, so it never places, modifies or closes a trade. A spreadsheet export remains a fine choice when you want full control of the columns.

Limits and cautions

Frequently asked questions

Why are my exported numbers not adding up in Excel?
They are probably text. Fix the decimal and thousands separators for your locale and convert the column to numbers.
Why does the date column not sort?
It is text. Convert it to a date and time type or split it into date and time columns.
Why does my export contain deposits?
The history includes balance operations. Filter rows that have no symbol before computing trade statistics.
How do I count trades instead of deals?
Group the deal rows by position ID.
Can I skip exporting altogether?
A tool that reads your history directly can. The journal app does this on your own PC and can still create an Excel report.

Related guides

Skip the clean-up with a local journal: free for 7 days

Free for 7 days, no card required. After that, a one-time $19.99 purchase. No subscription. Also on the Microsoft Store.

One-time $19.99, no monthly fee · your MT5 login never leaves your PC · trades go into your own journal on your PC, not through our servers.

Start free 7-day trial