Guide
Export your MT4 trade history to Excel
MetaTrader 4 has no Excel button, but it can save your history as a report that Excel opens. Here is how, what the report leaves out, and how to get every account's trades in one CSV file instead.
Save the history as a report
The report holds what the Account History tab shows, so first make the tab show everything.
Right click in the tab and choose All History, so the report covers every trade the terminal holds.
Right click again and choose Save as Report, or Save as Detailed Report, which adds a balance chart and summary figures such as profit factor. Then choose where to save it.
MetaTrader saves the report as a web page, an .htm file, which opens in any browser.
Open it in Excel
In Excel, choose File › Open, browse to the report and open it: Excel reads the web page as a sheet. Save it again as an Excel workbook to keep it as a spreadsheet. If Excel will not open it, open the report in your browser instead, select the table of trades, copy it, and paste it into a sheet.
The report is laid out for reading rather than for a spreadsheet: a heading, then the closed trades, the open trades and a summary, one after another. Delete the rows around the closed trades before you sort, filter or add them up.
What the report leaves out
- Every other account. Each account saves its own report, in its own terminal, and nothing combines them.
- Trades your broker has removed. The report holds only what the broker's server still has, so it has to be saved again before the next trim. Why history disappears
- Magic numbers and pips. MetaTrader's history lists each trade's times, prices, costs, profit and comment, but not the magic number of the EA that placed it, or the result in pips.
Every account in one CSV
IfStats keeps every trade from every connected account, with its magic number, EA and pips, so one export covers all of them.
- On the Trades page, narrow the grid to what you want: a broker, an account, a symbol, a magic number or an EA, winners or losers, or leave it on everything.
- Show the columns you want in the file: an export has the columns showing in the grid, in its order.
- Choose Export, then Download CSV for a file with every selected trade, which opens straight in Excel, or Copy to paste them into a spreadsheet.
The free plan shows the last three months, and an export holds what the grid shows. Pro shows a year and Premium everything, and nothing older is ever deleted. Export works in the demo too, on sample trades, with no sign-up.
Keep every MT4 trade, from today
IfStats captures each trade as it closes, on every broker account you connect, and keeps it for good. Setup takes about ten minutes, and the free plan needs no card.