What Trade History Exporter does
Trade History Exporter is a free script by DinexSpace for MT5. Exports your trade history to a CSV file.
Trade History Exporter is a script that saves your account's trading history to CSV files, so you can study your own results in Excel, Google Sheets or Python. It only reads history.
- Deals file, one row per deal: ticket, time, symbol, type (buy, sell, balance, commission …), entry (in, out, reverse, close by), volume, price, commission, swap, fee, profit, magic number, position ID and comment.
- Positions file (optional), one row per position opened and fully closed inside the range: symbol, side, open and close time, volume, average open and close price, profit, swap, commission, fee, net result and magic number.
- File names start with the account number and today's date, so repeated exports do not overwrite older ones from other days.
When to use it
Use it to analyse your results in Excel or Google Sheets.
Features and modes
Trade History Exporter has 3 documented features, listed below.
How to use it
- Drag the script onto any chart.
- Choose the date range (server time), and optionally a single symbol or magic number.
- Press OK. The Experts log shows how many rows were written and where.
Parameters
Trade History Exporter has 6 inputs; every input and its default is listed below.
From, To (0 = now), symbol filter, magic filter, positions file on/off, column separator ("," or ";" for spreadsheets that use a comma as decimal mark).
| Input | Default | Label in MT5 |
|---|---|---|
InpFrom | D'2026.01.01 00:00' | From (server time) |
InpTo | 0 | To (0 = now) |
InpSymbol | "" | Only this symbol (empty = all) |
InpMagic | -1 | Only this magic number (-1 = all) |
InpPositions | true | Also write one row per closed position |
InpSep | "," | Column separator ("," or ";") |
Signals
Trade History Exporter does not generate buy or sell signals. It is an analysis tool: you read what it plots and make your own decisions.
Alerts
No. Trade History Exporter has no built-in alerts.
Buffers for Expert Advisors
No. Trade History Exporter is an MT5 script that runs once; it has no indicator buffers.
Timeframes and markets
Trade History Exporter sets no timeframe limit in its code: it runs on any chart timeframe and on the symbol of the chart it is attached to.
Limitations
Trade History Exporter is an analysis tool, not a trading system. Its documented limitations are listed below.
- Only the history available in the terminal is exported. On some accounts you may need to set the History tab to "All history" first.
- Positions that were opened before the start date or are still open are left out of the positions file, but their deals are in the deals file.
- Text fields containing the separator are quoted.
The script never places, changes or closes orders, sends nothing over the network, and writes only inside the terminal's own Files folder.
Trade History Exporter FAQ
Trade History Exporter is free, runs on MT5 and does not place trades.
Is Trade History Exporter free?
Yes. Trade History Exporter is free to download from this page with no sign-up, and the download includes the full source code.
Which platforms does Trade History Exporter run on?
Trade History Exporter is available for MetaTrader 5 (MQL5).
Does Trade History Exporter give buy and sell signals?
Trade History Exporter does not generate buy or sell signals. It is an analysis tool: you read what it plots and make your own decisions.
Does Trade History Exporter have alerts?
No. Trade History Exporter has no built-in alerts.
Can an EA read Trade History Exporter?
No. Trade History Exporter is an MT5 script that runs once; it has no indicator buffers.
Which timeframes does Trade History Exporter work on?
Trade History Exporter sets no timeframe limit in its code: it runs on any chart timeframe and on the symbol of the chart it is attached to.
Does Trade History Exporter place trades?
No. It is a read-only script: it only reads market data and shows the result on the chart or writes it to a file. The source contains no calls that open, close or modify orders.
How do I install Trade History Exporter?
Download the .zip and follow the step-by-step installation guide for MT5: https://indicators.dinexspace.com/install-guide/
Measured win rates (backtest)
Arrows and win rates are those of SuperTrend (the default source indicator). SuperTrend
- Costs: Real spread of an ECN-type MT5 account, no commission.
- Data source: MT5 tick data (BNB: Binance spot).
TradingView H4/D1 bars may follow the exchange time zone of the TradingView symbol, not the MT5 server time (UTC) used for the measurement; sessions and the H4 trend may differ on the Pine version. Same signals on TradingView not checked yet.
Past test statistics are not a promise of future results.