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:
- Profit, ascending: your worst trades are at the top, which is the quickest way to find the losses that deserve a closer look.
- Profit, descending: the best trades, which you should also read, because luck and skill look the same at first.
- Symbol: groups trades by instrument, so you can see how many belong to each.
- Time: restores the chronological order that makes sequences visible, such as a run of losses.
- Swap and commission: shows which trades were expensive to hold or to trade.
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
| Symptom | Likely cause | Fix |
|---|---|---|
| Dates sort as text | The spreadsheet did not recognise the date format | Convert the column to a date type or use a text-to-columns step |
| Profit column cannot be summed | Numbers contain a space as thousands separator or a comma as decimal | Replace the separators, then convert to numbers |
| Totals do not match the footer | Balance rows or a different period were included | Compare the same view and period |
| Duplicate trades | Deals and Positions views were mixed | Copy from one view only |
| Missing swap or commission | The columns were hidden when copying | Show 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
- Menu entries for copy, select all and reports differ by terminal build; check your own terminal.
- The History tab shows what the broker server provides; if rows are missing, read trade history not showing.
- Never share a spreadsheet that contains your account number or login in the file name or cells.
- Nothing here is trading advice.
Frequently asked questions
How do I sort the MT5 history by profit?
Can I copy the MT5 history into Excel?
Why are my pasted dates not sorting?
Why do the footer totals change?
Does the journal app need me to copy anything?
Related guides
- A local trading journal for MT5
- P&L calendar for MT5
- Trade notes, ratings and screenshots
- Trading progress and goals
- Back up your journal and move it to a new PC
- An offline trading journal for Windows
- How to set monthly trading goals
- Import your whole MT5 history
- How to tag trades
- Trade screenshots for your journal
- All trading journal comparisons
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