A trader’s history sits in the terminal, fifty trades deep, and the only questions it can answer there are the ones the terminal’s own window asks: what happened, and in what order. The questions that improve trading — which symbol earns, how long trades are held, whether the wins are big enough to pay for the losses — need the history as rows in a spreadsheet, where it can be sorted, summed and split. This article shows how to take the history out of MT5, clean it into a usable table, and compute the first measurements from it — so that by the end, you will be able to export a month of trades, turn the file into a journal-ready table, and read the totals that connect directly to the journal articles of batch M3.
Prerequisite: “How to Close a Trade: Full Close, Partial Close, Trailing Stop and Checking Your History” (Beginner Batch 2) — where the trade history lives in the terminal and what its rows already record. Connects to “The Journal, Level Two: Adding Setup, Context and Cost Columns” (M3) and “Your First 50 Trades as Data: Win Rate, Payoff and Expectancy from Your Own Log” (M3) — the journal and the measurements this export feeds.
Key points
- The terminal’s history window is for looking; analysis needs the history as rows in a spreadsheet, where it can be sorted, summed and split by symbol, direction and holding time.
- Exporting starts with choosing the date range in the History tab: a file that covers the wrong period answers the wrong question, however carefully it is analysed.
- The exported file needs cleaning before it can be computed on: summary rows removed, dates in one format, numbers stored as numbers rather than as text.
- The first measurements from an export are counts and totals: trades by symbol, win rate, average win and average loss, expectancy, and average holding time. Each one is a single formula over the table.
- The export has limits: it contains what the terminal recorded, and nothing else. It has no setup column, no context column, and no record of the quotes at the moment of entry — which is why the journal (M3) still has to be filled in at the time of the trade.
Start trading with Exness
You can open an account here:
In plain words
The terminal’s history window shows what happened, in the order it happened, but it cannot group trades by symbol, subtract open from close times, or average anything — so the history has to be exported into a spreadsheet before it can answer the questions that improve trading. The procedure is to choose the period to match the question, export with the Report command, then clean the file in order: remove the summary rows, convert the dates to one format, make the numbers numeric rather than text, and add the setup and context columns the export does not have, filled from the journal and never from memory. In the worked example, 12 trades — 7 EURUSD and 5 XAUUSD — gave a win rate of 58.3%, an average win of $58.86, an average loss of $39.60, an expectancy of +$17.83 per trade and an average holding time of about 114 minutes, with EURUSD at +$96 (+$13.71 per trade) and XAUUSD at +$118 (+$23.60 per trade) toward a net of +$214. The export still has limits that must be kept in view: the swap column totalled −$6.40 across the twelve trades and the fee column $0.00, but the spread is not in the export at all, so the spreadsheet’s totals are cross-checked against the report’s own summary rows and reconciled with the journal before any measurement is trusted.
All procedures are for study and practice on a demo account.
1. Why the history has to leave the terminal
The History tab in MT5’s Toolbox shows every closed position: its symbol, direction, size, open and close times and prices, stop and target, swap, fee and result. It shows them one screen at a time, in the order they closed, and it answers one question well: what happened. Three questions it answers badly are the ones a trader most needs answered. Which symbol earns and which one loses? That needs the trades grouped by symbol and summed — a grouping the history window does not do. How long are trades held, on average, and does holding longer help or hurt? That needs the open and close times subtracted and averaged — arithmetic the window does not perform. Is the method’s expectancy positive once costs are included? That needs the net results totalled and divided by the trade count — a calculation the window leaves to the reader.
A spreadsheet answers all three, because a spreadsheet is built for grouping, subtracting and averaging. The export is therefore not a piece of administration; it is the step that turns a record into an instrument. The journal articles in batch M3 describe what to record and what to compute; this article describes how to get the raw material out of the terminal and into the shape those articles assume. A trader who keeps a journal by hand, copying each trade’s figures from the history window, is doing the same work more slowly and with more transcription errors. The export removes the copying: the figures arrive in the spreadsheet exactly as the terminal recorded them, and the trader’s work moves from transcription to analysis.
2. Choosing the period, then exporting
The export begins before any file is created, with the period. In the Toolbox, open the History tab and set the period the export should cover — the tab’s period selector offers presets such as today, the last week and the last month, and a custom range for anything else. The period is chosen to match the question: a monthly review needs a calendar month; a fifty-trade measurement needs the period that contains the first fifty trades in order; a comparison of two symbols needs a period long enough to hold a reasonable count of each. A file that covers the wrong period is not a flawed export; it is an export of the wrong question.
With the period set, the export itself is a right-click in the History tab and the Report command, which saves the history as an HTML report file. A spreadsheet program can open that file through its import function (see the FAQ if the file opens in a browser instead) — the report contains the trade rows, followed by summary rows that total the period.
3. Cleaning the file: from a report to a table
A report is not yet a table. Four cleaning steps turn it into one, and each step is checked before the next begins.
- Remove the summary rows. The report ends with totals and summary lines for the period. They are useful as a cross-check — the spreadsheet’s own totals should match them — but they are not trade rows, and leaving them in the table corrupts every count and average. Delete them from the working copy, and write the report’s own totals down separately, to compare against the spreadsheet’s totals at the end.
- Put the dates in one format. Exported dates may arrive as text in a format the spreadsheet does not recognise as a date, and a date stored as text cannot be subtracted. Convert the open-time and close-time columns to the spreadsheet’s date-time format, and confirm the conversion by subtracting one row’s close time from its open time: the answer should be a sensible holding time in minutes or hours, not an error.
- Make the numbers numeric. Money figures may arrive with currency symbols or thousands separators that leave them stored as text. Strip the symbols and separators so the values are numbers, and confirm by summing one column: a column of text sums to zero, which is the giveaway that the conversion failed.
- Add the columns the export does not have. The journal’s setup and context columns (M3, Article 3) do not exist in the export, because the terminal never knew them. Add empty columns for setup, session and events beside the exported rows, and fill them from the journal — not from memory, and not by guessing. Where a row’s setup was never recorded, the cell stays marked “not recorded”, which is the honest entry the journal article prescribes.
The table below shows what the cleaned table looks like, using the illustrative twelve trades of the worked example in Section 5. It shows the exported columns and the computed holding time; the setup, session and events columns are added beside them in the working file, filled from the journal.
| Trade | Symbol | Result (net) | Holding time |
|---|---|---|---|
| 1 | EURUSD | +$85.00 | 45 min |
| 2 | EURUSD | −$42.00 | 120 min |
| 3 | XAUUSD | +$74.00 | 30 min |
| 4 | EURUSD | +$62.00 | 240 min |
| 5 | XAUUSD | −$28.00 | 90 min |
| 6 | EURUSD | −$35.00 | 60 min |
| 7 | XAUUSD | +$59.00 | 180 min |
| 8 | EURUSD | −$48.00 | 25 min |
| 9 | XAUUSD | −$35.00 | 300 min |
| 10 | EURUSD | −$58.00 | 75 min |
| 11 | XAUUSD | +$48.00 | 150 min |
| 12 | EURUSD | +$36.00 | 55 min |
4. The first measurements: counts, totals and holding time
Five measurements are worth computing from any export, and each one is a single formula over the table. They are the same numbers the journal batch computes, and they are computed here from the export so that the two sources can be checked against each other — a journal total that disagrees with the export total means one of the two records is wrong, and the disagreement is worth finding.
- Trade count, by symbol. Count the rows per symbol. In the worked example: EURUSD 7 trades, XAUUSD 5 trades, 12 in total. A symbol with two trades in a month cannot support a per-symbol conclusion, whatever its total says.
- Win rate. Wins divided by all trades. In the worked example: 7 wins of 12 trades, or 58.3%. The win rate is reported with the trade count beside it, because 7 of 12 and 70 of 120 are different evidence.
- Average win and average loss. The winning trades’ results totalled and divided by the number of wins; the losing trades’ results totalled (as positive amounts) and divided by the number of losses. In the worked example: $58.86 and $39.60. The two averages, with the win rate, are the inputs to expectancy.
- Expectancy. (Win rate × average win) − (loss rate × average loss), in money per trade, computed both ways as a cross-check, exactly as in the journal batch. In the worked example: +$17.83 per trade.
- Average holding time. The holding times summed and divided by the trade count. In the worked example: 1,370 minutes over 12 trades, or about 114 minutes. Holding time is the measurement the export makes easy and the journal makes tedious: two time columns, one subtraction per row, one average. It is also the measurement that most often surprises — traders who believe they hold trades for hours discover from the export that the average is under two hours, because the memorable trades were the long ones.
Two further splits are worth doing once the five measurements exist. The first is net result by symbol: EURUSD +$96 over 7 trades (+$13.71 per trade) against XAUUSD +$118 over 5 trades (+$23.60 per trade) in the worked example — a difference that invites a question, not a conclusion, at twelve trades. The second is costs as recorded: in the full export file (the printed extract omits the swap and fee columns), the swap column totals −$6.40 across the twelve trades, or −$6.40 ÷ 12 = −$0.53 per trade on average, and the fee column totals $0.00, because the account type in the example applies no per-trade fee. The spread is not in the export at all — it can only be reconstructed from the quotes recorded at the time, which is why the journal article insists on writing them down. An export that is used as if it contained all costs understates the costs, and the missing cost is the largest one.
5. A worked example: twelve trades, every step shown (illustrative)
An illustrative export: 12 trades, two symbols, all figures invented. Each step is shown in full.
Step 1 — Count the trades. 12 trades in the file: 7 EURUSD and 5 XAUUSD. Check: 7 + 5 = 12.
Step 2 — Count the wins and losses. 7 wins, 5 losses, no scratch trades. Win rate = 7 ÷ 12 = 0.5833, or about 58.3%. Loss rate = 5 ÷ 12 = 0.4167, or about 41.7%. Check: 58.3% + 41.7% = 100%.
Step 3 — Add up the wins and the losses. The 7 winning trades total $412. Average win = $412 ÷ 7 = $58.86 (58.857, rounded). Check: 7 × $58.86 = $412.02, which matches $412 to rounding. The 5 losing trades total $198. Average loss = $198 ÷ 5 = $39.60. Check: 5 × $39.60 = $198.
Step 4 — Net result. Net result = $412 − $198 = +$214. By symbol: EURUSD +$96, XAUUSD +$118. Check: $96 + $118 = $214.
Step 5 — Expectancy, route one. Expectancy = (win rate × average win) − (loss rate × average loss) = (7 ÷ 12 × $58.857) − (5 ÷ 12 × $39.60). First term: 0.5833 × $58.857 = $34.33. Second term: 0.4167 × $39.60 = $16.50. Expectancy = $34.33 − $16.50 = +$17.83 per trade. Route two: net result ÷ trades = $214 ÷ 12 = $17.83 per trade. The two routes agree, as they must.
Step 6 — Average holding time. The twelve holding times, in minutes: 45, 120, 30, 240, 90, 60, 180, 25, 300, 75, 150, 55. Sum: 45 + 120 = 165; 165 + 30 = 195; 195 + 240 = 435; 435 + 90 = 525; 525 + 60 = 585; 585 + 180 = 765; 765 + 25 = 790; 790 + 300 = 1,090; 1,090 + 75 = 1,165; 1,165 + 150 = 1,315; 1,315 + 55 = 1,370 minutes. Average = 1,370 ÷ 12 = 114.166, or about 114 minutes per trade. Longest holding time: 300 minutes (5 hours). Shortest: 25 minutes.
Step 7 — Per-symbol averages, for contrast. EURUSD: +$96 over 7 trades = $96 ÷ 7 = +$13.71 per trade. XAUUSD: +$118 over 5 trades = $118 ÷ 5 = +$23.60 per trade. The per-trade figures differ by $9.89, on samples of 7 and 5 trades. That difference is a question — is it the symbol, the holding time, the session, or chance? — and twelve trades cannot answer it. The export’s job is to make the question visible; the journal’s setup and context columns, and the next fifty trades, are what answer it.
Step 8 — Cross-check against the report’s own totals. The report’s summary rows, written down separately in Section 3, said the period’s net result was +$214 over 12 trades. The spreadsheet’s totals say the same: +$214 over 12 trades. The two agree, so the cleaning did not lose or duplicate a row. If they had disagreed, the cleaning would be repeated from the raw file — not patched by editing a figure until it matched.
The example’s lesson is in the last step as much as in the first: an export that has not been cross-checked against its own report is a table of unknown accuracy, and a measurement built on it is a guess with a spreadsheet’s formatting.
6. The monthly export routine
- One file per account, one file per period: demo and live histories are never mixed in one file, and a month’s file covers that month only. The file’s name records the account, the period and the export date.
- Raw file kept untouched: the exported file is stored as the raw record, and all cleaning and analysis happen on a copy. A mistake is undone by copying the raw file again.
- Counts checked at export: the file’s row count is compared with the history window’s trade count before any cleaning begins. A mismatch means the period was set differently, and the export is repeated.
- Cleaning in order: summary rows removed, dates converted, numbers made numeric, journal columns added — each step checked before the next begins, and the report’s own totals written down for the final cross-check.
- Five measurements, every month: trade count by symbol, win rate, average win and loss, expectancy by both routes, and average holding time. The same five, computed the same way, so that months can be compared with each other.
- Journal reconciled: the export’s totals are compared with the journal’s totals for the same period. A disagreement is investigated, not averaged away: one of the two records is wrong, and finding which one is the point of keeping both.
Summary — what to take away
- The history window is for looking; analysis needs the history as spreadsheet rows, where it can be grouped, summed and split. Exporting is the step that turns a record into an instrument.
- Choose the period first, then export with the Report command, name the file by account and period, and check the row count against the history window before cleaning anything.
- Clean in order: remove summary rows, convert dates, make numbers numeric, add the journal columns the export does not have. Work on a copy; keep the raw file untouched.
- In the worked example, 12 trades gave a win rate of 58.3%, an average win of $58.86, an average loss of $39.60, an expectancy of +$17.83 per trade, and an average holding time of about 114 minutes.
- Cross-check the spreadsheet’s totals against the report’s own summary rows, and reconcile the export with the journal. A disagreement between two records is something to investigate, not to average away.
Next reads
- The Journal, Level Two: Adding Setup, Context and Cost Columns (M3) — the journal this export feeds: the setup and context columns the export does not have, and the routine for filling them in at the time of the trade.
- Your First 50 Trades as Data: Win Rate, Payoff and Expectancy from Your Own Log (M3) — the same five measurements computed from journal rows, and what fifty trades can and cannot prove.
- How to Close a Trade: Full Close, Partial Close, Trailing Stop and Checking Your History (Beginner Batch 2) — where the history lives in the terminal, and which of its figures the journal and the export both copy.
FAQ
Q: The exported file will not open in my spreadsheet program. What is wrong?
A: Usually the file is a report in a format the program does not recognise as a table, or it was saved with an unfamiliar extension. Open it from inside the spreadsheet program with the import function, rather than by double-clicking, and choose the format the program offers for the file. If the import shows the dates or numbers as text, the cleaning steps in Section 3 — date conversion and making numbers numeric — are the fix, applied after the import.
Q: Can I export the history of a demo account and a live account together?
A: No — keep them in separate files, and analyse them separately. Demo and live execution differ, so mixing the two without a marker corrupts any measurement drawn from the combined rows. The beginner batch explains the differences; the export routine keeps the separation by using one file per account.
Q: My spreadsheet’s total does not match the report’s summary total. What do I do?
A: Repeat the cleaning from the raw file; do not edit a figure until it matches. The common causes are a summary row left in the table, a money figure stored as text and therefore counted as zero, or a trade row deleted by accident. The report’s summary total is the check figure, and the cleaning is finished only when the spreadsheet’s total agrees with it.
Q: The export has no setup column. How do I add one?
A: Add an empty column beside the exported rows and fill it from the journal, not from memory. Where a row’s setup was never recorded, mark the cell “not recorded” rather than reconstructing it afterwards. A row with an honest gap is usable; a row with an invented setup teaches the wrong lesson at the next review.
Q: How often should I export?
A: Monthly, at the monthly review, and additionally whenever a measurement is needed — the first fifty trades, a per-symbol comparison, a check after a rule change. Each export is one file per account per period, named by account, period and export date, so that any month’s file can be found and re-opened without guessing which “report” it is.
Sources: MetaTrader 5 Help pages “History” and “Reports” (MetaQuotes) for the History tab and the Report command. Checked: 22 November 2026. The worked example in Sections 3 and 5 is illustrative, with invented figures.
This article is information only and is not investment advice. Forex and CFD trading involves a substantial risk of loss, including the possibility of losing more than you deposited with some account types and jurisdictions. Practise on a demo account until every procedure in this batch is familiar. Make sure you fully understand how leveraged products work before you consider trading with real money.
Disclosure: Broker Cost Check is reader-supported. If you open an account through a partner link on this page and trade, Exness pays us a share of the revenue from your trading activity under its partner programme. You pay us nothing: our payment comes from Exness, out of that revenue. How we make money: How Broker Cost Check works — method and how we make money
Sources
Checking and corrections: how we check figures and handle corrections is set out on our method page. The official pages for the terms covered on this page are listed under Sources below.
Official Exness pages for the terms covered on this page:
- Exness — MetaTrader 5 — the official Exness page on MetaTrader 5.
- Exness Help Centre — Available trading platforms — the official guide to the available trading platforms.

Leave a Reply