MT5 deal entry types: in, out, in/out and out by explained

Learn what each label in the deals list means, how reversals and close-by appear, and how to turn many rows into one trade.

Open the Deals view of the MetaTrader 5 history and you will see a column that labels each row with something like “in” or “out”. That label is the deal’s entry type, and it is the key to turning a long list of executions into trades you can count, group and review. This page explains the four entry types, how they show up on hedging and netting accounts, how to use them when you copy history into a spreadsheet, and where the labels can mislead you if you take them at face value.

What an entry type describes

Every deal in MetaTrader 5 is a single execution at a price and a volume. The entry type tells you what that execution did to the position it belongs to. An entry deal creates or increases a position. An exit deal reduces or removes it. Two further types cover special cases: a deal that reverses a position and a deal that closes one position against another. The terms come from the platform’s own trading model, which separates orders (instructions), deals (executions) and positions (the running result), as described in deal, order and position IDs.

On screen the label may be spelled differently depending on your terminal language and build, so treat the names below as the idea rather than an exact string, and check your own terminal. In the Python interface the same four values exist as numeric constants, which is how scripts read them; the approach is shown in reading history deals in Python.

The four entry types

Entry typePlain meaningTypical row you will see
InOpens a position or adds volume to itThe buy or sell that starts a trade, or a scale-in
OutReduces or closes a positionThe exit, a stop loss, a take profit, or one step of a partial close
In/out (reverse)Closes the old direction and opens the opposite one in a single dealA reversal on a netting account
Out byCloses a position against an opposite oneA close-by on a hedging account

Only exit deals carry a realised profit. An entry deal normally shows zero profit, although it can carry a commission, depending on how your broker charges costs. That is why a simple sum of the profit column still works, but a count of rows does not give you a count of trades.

Reading a normal trade

A simple trade has two deals: one entry and one exit. The entry shows the opening price and volume, the exit shows the closing price and the profit. If you filter the Deals list to a single symbol and sort by time, a clean trade appears as an in followed later by an out with the same volume. This is the easy case, and most beginners only ever meet this one.

Things get more interesting when the volumes do not match. If you buy 1.00 lot in two steps of 0.50 and then close in one exit of 1.00, you have two entry deals and one exit deal for one position. If you buy 1.00 and close 0.30, then 0.30, then 0.40, you have one entry and three exits. Both are still one position, and both are explained from the position side in scaling in and out and partial closes in history.

Reversals on netting accounts

On a netting account there is only one position per symbol. If you hold a long of 1.00 lot and send a sell of 1.50 lots, the platform closes the long and opens a short of 0.50 in one step. That single deal is the in/out type: part of it is an exit and part of it is an entry. The profit on it belongs to the closed part. The mechanics and a numeric walk-through are in position reversal on netting accounts. When you analyse a sheet, remember that one in/out row is really two events, and it can start a new trade and end an old one at the same timestamp.

Close-by on hedging accounts

On a hedging account you can hold a buy and a sell on the same symbol. The close-by function lets you close one against the other, which produces deals that the history marks as out by. The result of a pair closed this way is recorded across the two deals, and the costs can be split in a way that looks odd at first. See close by in trade history for how the rows look and why one side may show the profit while the other shows almost nothing.

How to group deals into trades in a sheet

A worked example (hypothetical)

Suppose a position has three deals: an entry of 0.40 lots, a second entry of 0.20 lots, and one exit of 0.60 lots at a profit of 90 with a commission of minus 4 in total and a swap of minus 1. Counting rows gives three trades, which is wrong. Grouping by position gives one trade with a net result of 85. If you also want to know what happened inside the trade, the two entries show that you added after the first fill. The numbers are invented and only illustrate the grouping.

Where the labels can mislead

What the journal app does with this

AI Trading Journal, a Windows app for MetaTrader 5 only, reads the closed history on your own PC and keeps one entry per closed position, so the entry and exit deals do not have to be grouped by hand. Partial closes are combined, the entry is dated by the last exit on the broker’s server clock, and the result is profit plus commission plus swap. The app is read-only; it never places, modifies or closes a trade. It does not store a separate list of every in and out deal, so if you want to study how you scaled, write it in the notes of the entry.

Frequently asked questions

What does the in and out label mean in MT5 history?
It shows whether a deal opened or increased a position (in) or reduced or closed it (out). Two special types cover reversals and close-by.
Why do I see more deal rows than trades?
A position can have several entry and exit deals. Group the rows by position ID to count trades.
Which deals carry profit?
Exit deals carry the realised profit. Entry deals usually show zero profit and may show a commission.
What is an in/out deal?
A single deal that closes a position in one direction and opens a new one in the opposite direction, which happens on netting accounts.
Do all brokers show the same labels?
The idea is the same on every MT5 account, but the wording and columns depend on the terminal build, so check your terminal.

Related guides

Skip the grouping work with a local journal: free for 7 days

Free for 7 days, no card required. After that, a one-time $19.99 purchase. No subscription. Also on the Microsoft Store.

One-time $19.99, no monthly fee · your MT5 login never leaves your PC · trades go into your own journal on your PC, not through our servers.

Start free 7-day trial