You cannot import trade history into MT5 from the Manager terminal โ there is no import button. The only supported route is to write each trade through the MT5 Manager API as a closed order plus a matching pair of IN and OUT deals. Get that structure wrong and the trades either fail to appear in the History tab or appear without affecting the account balance.
This guide explains why MT5 makes this awkward, what a valid imported trade actually consists of, and the five things that break imports in practice.
Why You Cannot Import Trade History into MT5 Natively
MetaTrader 5 does not model a “trade” as a single record. It stores three related object types:
- Orders โ the instruction to buy or sell
- Deals โ the executions that resulted, each flagged with a direction: IN (opening exposure), OUT (closing it), or INOUT (reversing)
- Positions โ the live net exposure, which ceases to exist once closed
A closed round-turn trade that a trader sees as one line in their statement is therefore at least three server records. MT4’s simpler single-record model made history manipulation straightforward; MT5’s accounting model is stricter, which is better for auditability and considerably harder to write into.
Because the Manager terminal exposes no import path, every real solution goes through the MT5 Manager API, which has the server-side authority to create historical records directly.
What a Valid Imported Trade Looks Like
To import one closed EURUSD buy of 0.40 lots, you write:
| Record | Key fields | Purpose |
|---|---|---|
| Order | Ticket, symbol, type, volume, open time, open price | The historical instruction |
| Deal (IN) | Ticket, order ref, volume, entry price, time | Opens the exposure |
| Deal (OUT) | Ticket, order ref, volume, exit price, time, profit, commission, swap | Closes it and books P/L |
The profit figure belongs on the OUT deal. A common mistake is writing a single deal with a profit value โ the trade then shows in history but the balance never moves, and the account’s equity disagrees with its own statement.
The Five Things That Break Imports
1. Ticket collisions
Every order and deal needs a unique ticket, and MT5 rejects any ticket at or below the account’s last used value. Importing a historical set with low ticket numbers โ which is exactly what an export from another platform contains โ fails immediately. You must read the account’s current ticket high-water mark and allocate above it.
2. Prices outside the real candle range
If you write an entry at 1.08412 but the symbol never traded at that level in that minute, the trade is technically accepted and permanently implausible. Anyone checking the record against chart data will spot it. Validate every price against the server’s own high/low for the candle it claims to have executed in, and snap it to the nearest valid tick when it falls outside.
3. Time integrity
Close times before open times, timestamps falling in a market-closed window, and trades dated before the account was created are all common in spreadsheet data. MT5 will happily store some of these. Check them yourself.
4. Symbol and volume rules
Symbol names must resolve against the server’s symbol table โ GOLD on the source platform may be XAUUSD on yours. Volumes must respect each symbol’s minimum, maximum and step. A 0.03 lot trade on a symbol with a 0.05 step is invalid.
5. Writing too much at once
Pushing a thousand trades in a single request is how you lock the server or time out halfway through, leaving a partial history nobody can reconcile. Batches of around 20 trades per request, with a stop on first failure, is the pattern that survives contact with a live server.
Where the Data Comes From
Three sources cover almost every case:
- A broker or platform export โ CSV, TSV or XLSX, one row per trade. Column names vary wildly, so mapping to MT5 fields is the first real task.
- Manual entry โ for a handful of missing deals or corrections, faster than preparing a file.
- Generated from candle data โ for demo, UAT and training environments, trades can be built against the broker’s real candles so that every price sits inside a genuine high/low range.
Legitimate Reasons to Import Trade History into MT5
- Client migration. A trader moving from another broker keeps continuous statements and reporting.
- Server migration or recovery. Rebuilding deal history after a move, a restore, or a gateway failure that dropped records.
- Demo and UAT environments. Verifying statements, IB commission runs and CRM reporting against known numbers.
- Staff training and platform QA. Giving new dealers realistic accounts, and regression-testing commission logic and drawdown rules against a fixed data set.
One line is worth stating plainly: once written, imported deals are indistinguishable from traded ones. That is the point for migration, and it is why access needs to be restricted per operator and every import logged. Presenting generated history to clients or investors as a real trading record is misrepresentation of performance, and it is a regulatory matter in every jurisdiction that licenses brokers. Keep the audit trail, and keep generated sets on demo and test accounts.
Build It or Use a Tool
Scripting this yourself against the native Manager API is a realistic couple of weeks once you add ticket allocation, candle validation, batching and rollback โ and it is C++ or a .NET wrapper, version-locked to your server build. The practical question is whether trade-history import is something your engineers should own permanently. For most brokers it is a back-office function, not a differentiator.
If you are still deciding which interface your own integration should use, our comparison of MT5 Manager API vs Web API vs Gateway API sets out when you genuinely need server-side authority โ and history writing is squarely in that category.
Frequently Asked Questions
Q: Can you import trade history into MT5 from the Manager terminal?
A: No. MetaTrader 5’s Manager terminal has no import function. Historical trades must be written through the MT5 Manager API as a closed order plus matching IN and OUT deals, which is why every working solution is either a custom integration or a dedicated back-office tool.
Q: Why do imported MT5 trades show in history but not change the balance?
A: Almost always because the profit was written on a single deal rather than on the OUT deal of an IN/OUT pair. MT5 books realised P/L from the closing deal, so an incomplete pair produces a trade that is visible in the History tab while the account balance and equity never move.
Q: Why does MT5 reject my imported tickets?
A: MT5 refuses any order or deal ticket at or below the account’s last used ticket. Exports from other platforms normally contain low ticket numbers, so you must read the account’s current high-water mark and allocate fresh tickets above it before importing.
Q: How many trades can be imported at once?
A: Write in batches of roughly 20 trades per request and stop on the first failure. Larger batches risk timeouts or server locking, and a run that fails halfway without a stop leaves a partial history that is difficult to reconcile against the account balance.
The ForexPlatforms.Pro MT5 Web Manager does all of this from a browser โ file upload, manual entry or candle-based generation, automatic column mapping, per-row price and ticket validation, review on real candles, and batched writing as native orders and IN/OUT deals with a full audit log.