MetaTrader 5 Netting vs Hedging Accounts: What Happens When You Buy and Sell the Same Pair?
On an MT5 netting account, a new order in the opposite direction usually reduces, closes or reverses the existing position in that symbol. On an MT5 hedging account, an opposite order generally opens a second, separate position. This distinction affects stop-loss placement, margin use, trade journals, automation and the meaning of the Close Position command. It is set by the broker at the account level; switching a button in the chart does not convert one accounting system into the other.
This guide solves a specific retail execution problem: a trader sells EUR/USD expecting to hedge an existing buy and instead discovers that the position is smaller or reversed. The reverse can also happen: a trader expects a sell to close a buy, but the account holds simultaneous long and short positions. The official MetaTrader 5 position-accounting documentation describes both systems and their different stop and closing behaviours.
Buy 1.0 lot + sell 0.4 lot
One long 0.6 lot
Buy 1.0 lot + sell 0.4 lot
Two separate positions
Simplified full-fill example before trading costs. Broker accounting mode determines the actual outcome.
The core differences in one table
| Action | Netting account | Hedging account |
|---|---|---|
| Buy 1 lot then sell 0.4 | One 0.6-lot net long remains | Long 1 and short 0.4 coexist |
| Buy 1 lot then sell 1 lot | Flat (no net position) | One long and one short coexist |
| Buy 1 lot then sell 1.5 | One 0.5-lot net short remains | One long and one 1.5-lot short coexist |
| Position risk view | One net symbol exposure | Separate legs and their combined exposure |
| Exit method | Opposite order reduces or reverses | Use specific Close Position to avoid opening another leg |
The examples assume immediate full fills of valid orders with no other trades, fees or platform restrictions. Netting changes the way positions are represented; it does not prevent a broker from recording each actual deal in account history. Hedging does not automatically eliminate market or financing risk.
Worked example: two orders change exposure in different ways
A trader has a 1.00-lot EUR/USD buy at 1.10000. Later, the trader enters a 0.40-lot sell at 1.10200. In the netting model the sell closes 0.40 of the prior long, potentially realising approximately 20 pips on that closed portion, leaving 0.60 lots long. The new net position’s reported price information depends on the deal and position accounting details and broker platform; the P/L of the closed part is booked at execution.
In a hedging account the sell opens a separate 0.40-lot short and the original 1.00-lot long remains open, leaving 0.60 net directional lot exposure but 1.40 gross lots of open positions. The longs and shorts may have different spreads, swap charges and stop levels; the second trade has not realised the gain on the original long. Total exposure and collateral use must be calculated with the broker’s hedged-margin method, not by assuming 1.40 or 0.60 lots of margin universally.
At a hypothetical $10 per pip for one standard EUR/USD lot, a 20-pip move on 0.40 lots is $80 of price movement before costs. That approximate $80 would be realised on the closed netting portion, but in the hedging account it remains part of the aggregate open P/L of the two legs until closure. Commission, spread and account currency will alter the actual result.
Why opposite trades sometimes do not close a hedge
A trader using a hedging account may enter a normal Sell order on the chart while an earlier Buy is open. MT5 typically opens a separate short instead of selecting the existing long for closure. To close the original long, use that specific position’s Close Position command or an explicitly supported close-by mechanism where available. The broker may impose FIFO rules on certain products or accounts, affecting closing availability.
On a netting account, the same normal Sell deal offsets the single symbol position. If the sell volume exceeds the original buy, the remainder reverses direction. This matters for EAs: a function that blindly sends an opposite market order in a hedging account may double the number of legs instead of reducing exposure.
Stop-loss and take-profit behaviour requires special attention
MetaQuotes explains that inherited stop-loss and take-profit rules change with the accounting mode. In netting, there is one position for the symbol; a later trade can modify average exposure and the protective levels relevant to that net position. In hedging, each separate position can have its own protective order and direction. Never assume that a stop attached to the first leg automatically protects the second.
After an offsetting or reversing trade, re-open the position panel and verify the actual remaining size, direction, stop and take-profit prices. This is particularly important when an EA or trade copier connects accounts with different accounting modes. A pending order’s eventual execution can change the net position even if the user placed it hours earlier.
Hedged margin is not necessarily zero
Simultaneous long and short legs reduce some net price sensitivity but can still incur commissions, changing spreads and two separate overnight funding adjustments. Brokers can apply reduced hedged margin, full margin or a more complex tiered method. If one leg closes or a stop triggers, the remaining side becomes directional and the margin requirement can change abruptly.
For an illustrative 1-lot buy and 1-lot sell, net price exposure could appear close to zero if both legs use an identical reference, but gross volume is 2 lots. Spread crossings, dividend adjustments on CFDs, swap asymmetry and potential forced liquidation remain. A 10-pip widening of spread may affect floating results even with no directional mid-price move. See the general portfolio open-risk budgeting guide for why netting a number is not equivalent to removing risk.
A six-step account and EA compatibility check
- Read the account type displayed by the broker and confirm netting or hedging before sending any live orders.
- In demo, send a tiny virtual buy and then an offsetting virtual sell; observe whether one net position or two legs remain.
- Record deal IDs and position IDs, and check what the Close Position action does rather than guessing from the ticket label.
- On netting accounts, test how a larger opposite order reverses position direction.
- On hedging accounts, test whether the EA selects the intended position to close and how pending orders interact with existing legs.
- Verify stop inheritance, swap, commission, hedged margin and any local FIFO restrictions in the broker’s actual account specification.
These tests can be performed entirely with virtual funds. Do not create offsetting real-money positions simply to learn the platform. The broader MetaTrader order-rejection guide covers invalid volume, filling modes and margin errors separately.
When do trade reports and journals become misleading?
A hedged pair of legs can produce trades in the history that look like two independent strategy decisions, even if the second is intended as a risk-management offset. Conversely, a netting account can record partial closing deals and average position changes under one position. For valid expectancy and win-rate metrics, define whether a ‘trade’ means an entry deal, a completed position episode or an underlying research idea.
Export both orders and deals before making conclusions. A combined net gain on a hedged portfolio can conceal high turnover costs. See how to reconcile MetaTrader reports for accounting details.
Frequently asked questions
Can I hold a buy and sell on the same symbol in MT5?
Yes on a broker-enabled hedging account; on a netting account opposite deals normally reduce, close or reverse the single net symbol position.
Can I turn a netting account into a hedging account in settings?
The broker sets the position accounting mode. Ask the provider about account eligibility instead of treating it as a platform appearance setting.
Does buying and selling the same lot size eliminate losses?
No. Spreads, commissions, swaps, forced close-out and changes when a leg exits can still cause losses.
Why did my position reverse after I sold?
On netting accounts, an opposite order larger than the current position can close the original and open a residual position in the other direction.
Does hedged margin mean no margin?
Not necessarily. Provider margin and hedged-position rules differ, and they may change as one leg is closed.
Which account works with my EA?
It depends on how the EA identifies, groups and closes positions. Check the code’s documented accounting-mode support and test its exact orders on a matching demo account.
Primary sources
- MetaTrader 5: netting, hedging, closing and stop inheritance
- MetaTrader 5: executing trades and Close Position
Important notice: Retail educational material, not personalised trading advice. All numerical illustrations are hypothetical; applicable broker restrictions and execution rules take precedence. Leveraged trading can lead to rapid losses.
Stay Ahead of the Markets
Get market analysis, financial news and practical trading insights delivered straight to your inbox.