MT5 history tab: sort, filter and copy your trades to a spreadsheet

Sort by any column, choose the view and period, and move rows into a sheet without breaking dates and totals.

A surprising number of traders review their MetaTrader 5 history by scrolling. The History tab can do more than that: it can sort by any column, it can show or hide columns, and it can send its rows to a spreadsheet. Used carefully, those three abilities answer questions such as which symbol cost you the most, which weekday was weakest, and which trades paid the most swap, without any extra software. This page walks through sorting, column choices, selecting and copying rows, and the traps that make the numbers in a copied sheet wrong.

Before you start: choose the view and the period

Open the Toolbox window, click the History tab and right-click inside the list. Choose the view that matches the question. Positions gives one row per closed position, Deals gives every execution including the entry and exit sides, and Orders gives the instructions. For performance questions the Positions view is normally the easiest to read. Then set the period, because a sort of the wrong window is a wrong answer. The period menu is explained on MT5 history period and custom date range, and the meaning of each view on MT5 history columns explained.

Sorting by a column

Click a column header to sort the list by that column, and click again to reverse the direction. A small arrow normally shows the active sort. Some practical sorts:

Remember that the footer totals change with what is shown, not with the sort. Sorting only changes the order of rows. Filtering by period or view changes the total.

Showing and hiding columns

The right-click menu normally lets you add or remove columns such as commission, swap, comment, magic number and ticket. Show only what you need for the question. A narrow view is easier to read and easier to paste. The magic number is explained on magic number in MT5 history and the comment field on history comments.

Selecting and copying rows

Click a row to select it, hold Shift or Ctrl to select several, and look in the right-click menu for the select-all and copy options. The exact entries differ between builds, so check your terminal. Some builds copy rows as text that you can paste into a spreadsheet, and some offer a report command that saves the history as an HTML or spreadsheet file instead. The saving routes are compared on how to export MT5 trade history. If you are unsure which route preserves the columns you need, try a small period first and inspect the result.

Traps when a copied sheet looks wrong

SymptomLikely causeFix
Dates sort as textThe spreadsheet did not recognise the date formatConvert the column to a date type or use a text-to-columns step
Profit column cannot be summedNumbers contain a space as thousands separator or a comma as decimalReplace the separators, then convert to numbers
Totals do not match the footerBalance rows or a different period were includedCompare the same view and period
Duplicate tradesDeals and Positions views were mixedCopy from one view only
Missing swap or commissionThe columns were hidden when copyingShow them first

A worked example (hypothetical)

A trader suspects that most of their losses happen on one instrument. They set the Positions view and a custom period of one calendar month, sort by symbol and read the list in blocks. One symbol has many rows with small losses and a few with larger gains. They then sort by profit ascending and see that the three largest losses all belong to that symbol and all closed in the same two-hour window. The numbers are invented. A sheet is not needed for this, but with a copied sheet and a pivot the same insight takes a minute, and a note in the journal turns it into a rule to test.

Where the History tab stops

The History tab is excellent for one-off questions and poor for habits. It does not store your reasons, emotions or screenshots, it forgets sorts when you restart, and it cannot show a trend over many months without exporting. If you want to compare periods, a journal that stores one entry per closed trade is more practical. AI Trading Journal, a Windows app for MetaTrader 5 only, reads the whole history on the first run and then adds new closed trades every 5 minutes, one entry per closed position with partial closes combined. Its Export Report feature writes an Excel workbook with a summary and charts of net profit by close hour, weekday and symbol, and live formulas, as described on MT5 trading report in Excel. The app is read-only and the journal is a file in Documents\AI Trading Journal on your own PC.

Limits and cautions

Frequently asked questions

How do I sort the MT5 history by profit?
Click the Profit column header in the History tab. Click again to reverse the order.
Can I copy the MT5 history into Excel?
Many builds let you select rows and copy them, or save a report as an HTML or spreadsheet file. Check the right-click menu of your terminal.
Why are my pasted dates not sorting?
The spreadsheet probably treated them as text. Convert the column to a date type.
Why do the footer totals change?
They cover only the rows shown, so they change with the period and the view.
Does the journal app need me to copy anything?
No. It reads the account history itself and adds new closed trades every 5 minutes.

Related guides

Skip the copy and paste: 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