Export your MetaTrader trade history, no code
If your broker gives you MetaTrader 4 or 5, the desktop terminal can save your account history as a report file. MetaQuotes' help pages confirm HTML for MetaTrader 4, and HTML or PDF for MetaTrader 5. Works the same at every broker that runs MetaTrader.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
Steps
Open the desktop terminal
Log in to your account in the MetaTrader 4 or MetaTrader 5 desktop terminal your broker gave you. The history sits in a tab of the window along the bottom of the screen: Account History in MetaTrader 4, History in MetaTrader 5.
metatrader4.comchecked
MetaTrader 4: choose the period
Right click in the Account History tab and pick All History, Last 3 Months, Last Month or Custom Period. Custom Period lets you set your own start and end dates.
metatrader4.comchecked
MetaTrader 4: save the report
Right click again and choose Save as Report, or Save as Detailed Report for extra figures. Both save an HTML file and ask where to put it on your computer.
metatrader4.comchecked
MetaTrader 5: open the report
Right click in the History tab and choose Report, or open Reports from the View menu.
metatrader5.comchecked
MetaTrader 5: save as HTML or PDF
Save the report as HTML or PDF. The export commands sit in the File menu and in the report menu, added in build 4150 in January 2024, so update the terminal if you do not see them.
metatrader5.comchecked
Open the HTML file in Excel
In the MetaTrader 4 or 5 desktop terminal, open the History tab (Account History in MetaTrader 4), right click and choose Report (Save as Report in MetaTrader 4). That saves an HTML file. In Excel, choose File > Open, set the file type to All files, pick the saved .htm file and Excel opens the report as a sheet. Then File > Save As > Excel Workbook keeps it as a spreadsheet. MetaQuotes does not list the columns, so check the totals against your broker's statement.
Unverifiedsupport.microsoft.com
On the mobile app
We have not confirmed a file export from the MetaTrader mobile apps. Use the desktop terminal, or ask your broker for a statement.
Unverifiedmetatrader5.com