AlgoWay Blog

Guides, manuals and platform references.

Core
JSON & Alerts
MT5 / Expert Advisors
Errors
Integrations
Other Publications
AlgoWay Strategy Lab

MT5 Orders, Deals and Positions: Read Trade History Clearly

MT5 Orders, Deals and Positions: Read Trade History Clearly illustration

You asked MT5 to buy once. History shows an order and two deals, while the Trade tab shows one position. That can be entirely correct. Counting every row as another trade is rather like counting the receipt as a second purchase.

An order records an instruction, a deal records an execution, and a position records exposure. To investigate an apparent duplicate, connect those records and add up the executed volume. The number of rows is only the beginning of the question.

Three records with three different jobs

RecordQuestion it answersWhat it does not prove
OrderWhat was the broker instructed to do?That the entire requested quantity executed.
DealWhat quantity actually bought or sold, at what price?That a separate strategy signal existed for each execution.
PositionWhat exposure resulted?That it came from only one instruction or execution.

MetaQuotes explicitly notes that one order can produce several deals. An unfilled pending order is not a position; cancellation without execution does not create a trading deal. See the official order, deal and position definitions.

Follow one hypothetical order through two fills

Assume a netting account starts flat in a symbol and a Buy order for 1.00 lot is filled in two pieces. The numbers below are an accounting illustration, not a broker test or a promised execution pattern.

EventExecuted volumeNet position afterward
Buy instruction submittedNone yetFlat
First fill of that orderBuy 0.40 lotLong 0.40 lot
Second fill of that same orderBuy 0.60 lotLong 1.00 lot
Later, a separate Sell order fillsSell 0.25 lotLong 0.75 lot

After the second fill, there is one entry order, two entry deals and one open position. After the partial exit, there are two orders and three deals, but still one open position. The arithmetic is 0.40 + 0.60 - 0.25 = 0.75 lot. Adding an order's requested volume to its deals would count the same instruction twice.

This example deliberately uses netting. A hedging account can hold separate positions in the same symbol, so a new opposite entry is not automatically a reduction. Use the netting versus hedging guide before interpreting an opposite-side record as a close.

Read direction as well as Buy or Sell

A Sell deal may close a long rather than open a short. MT5 distinguishes entry, exit, reversal and closing by an opposite position. Deal records also carry their originating order and position association. These relationships are defined in the public deal-property reference.

Match the order association when checking whether several fills came from one instruction. Match the position association when reconstructing its lifetime. Do not assume the deal ticket, order ticket and position identifier are interchangeable merely because some numbers happen to match.

Also separate Buy/Sell executions from balance, credit, commission and other account operations. MT5's deal types include non-trading entries. A raw count of every history record is therefore a poor definition of “number of trades.” For a journal, choose and label the unit you mean: entries, executions or completed position lifetimes.

Reconcile history before resending a signal

In desktop MT5, open Toolbox >> History. Its display can show orders, deals, positions or a tree of operations. The position view combines related deals, which explains why switching views changes the number of rows. The official account-history instructions describe the fields and filters.

  1. Select the relevant symbol and a period covering the entry as well as the exit. MT5's position-history view excludes a position if it opened before the selected period and closed after it.
  2. Inspect the order record, its state and its associated execution deals. Compare requested quantity with total filled quantity.
  3. Read each deal's direction and position association. Reconstruct the remaining exposure and compare it with the current Trade tab.
  4. Compare timestamps in a common timezone. MT5 history uses the broker trading server's timezone; a differently displayed alert timestamp is not itself evidence of delay.

If the records show a rejected instruction rather than an execution, use the MT5 order-rejection guide. If they show more executed volume than intended, preserve the associated order and deal records privately before investigating the signal path. Do not send another order just to make a missing-looking row appear. First establish what the account already owns.

Last updated: October 7, 2026