CFDs and forex are complex instruments and come with a high risk of losing money rapidly due to leverage. Risk disclosure

Hedging vs netting in MT5

This page explains how the hedging and netting modes in MetaTrader 5 record your trades, and what changes for opposite orders, Expert Advisors and margin.

Extrade Pakistan editorial team ·

On this page
  1. What the account mode is
  2. How positions are recorded
  3. Side-by-side comparison
  4. What opposite positions really do
  5. Margin implications
  6. Implications for Expert Advisors
  7. A note for readers in Pakistan
  8. Frequent questions

What the account mode is

MetaTrader 5 supports different ways of recording positions. A position is your open exposure in a symbol, such as a buy on EURUSD that has not been closed yet. The account mode decides how the platform combines your trades into positions.

For retail forex and CFD accounts there are two modes:

The mode is set on the trading server when the account is created. You cannot switch it inside the terminal. If you need the other mode, you need a different account. Check which mode your account uses before you trade. Our pages on MetaTrader 5 and MT4 vs MT5 cover the platform in general.

Hedging mode
Netting mode
Each trade is a separate position.
One position per symbol.
Buy and sell positions on the same symbol can be open at the same time.
A sell order reduces, closes or reverses an open buy.
Each position has its own stop-loss and take-profit.
Stop-loss and take-profit apply to the whole position.
Common on forex accounts.
Common on exchange markets.
Hedging vs netting: how a platform counts positions on one symbol. Simplified general picture; details differ between countries, brokers and products.

How positions are recorded

Netting account

On an MT5 netting account, every deal in a symbol changes the same position:

Stop loss and take profit belong to the whole position, not to separate deals. For how these levels work, see stop loss and take profit.

Hedging account

On an MT5 hedging account, every market order or triggered pending order opens a new position with its own ticket number, open price, stop loss and take profit. The Trade tab of the Toolbox shows each position on its own line.

An opposite order does not close anything by itself. If you hold a buy and send a sell for the same symbol, you end up holding a buy and a sell at the same time. To close a position you close that specific ticket. Holding opposite positions on the same symbol is what "hedging account" means in MT5.

Hedging accounts also offer Close By. In the order window of an open position, you choose this operation and select an opposite position on the same symbol. The platform closes them against each other. If the volumes differ, the remainder stays open.

Side-by-side comparison

Point Netting Hedging
Positions per symbol A single position Many positions
Opposite order Reduces, closes or reverses the position Opens a separate opposite position
Open price Averaged across deals Kept per position
Stop loss / take profit Per symbol position Per ticket
Close By Not used Available
Typical origin Exchange-style accounting MT4-style accounting

What opposite positions really do

A buy and a sell of equal volume on a hedging account lock the floating result: further price moves change one side's profit and the other side's loss by similar amounts. The trade is not risk-free:

On a netting account the same pair of orders simply leaves you flat. That is often a clearer picture of your actual exposure.

Margin implications

Margin is the amount the platform sets aside to keep positions open. In netting mode, margin is calculated on the single net position. In hedging mode, the platform calculates margin for opposite positions using the symbol's hedged margin setting. Depending on the symbol, this can be lower than the margin for both sides counted separately.

You can find the value in the symbol's specification window. See contract specifications. Do not assume locked positions are protected from a stop-out, which is the forced closing of positions when the margin level falls too low. Leveraged CFD and forex trading can lose money fast in either mode. Read risk management before you trade with real money.

Implications for Expert Advisors

Expert Advisors are automated programs written in MQL5, and they must match the account mode:

Code ported from MT4 usually assumes hedging, because MT4 records every order separately.

A note for readers in Pakistan

Before you use any offshore platform, note that per the SECP, offshore platforms have no Pakistani licence or oversight and offer no legal protection or recourse. Read law and regulators for the wider picture.

Frequent questions

What does hedging account mean in MT5?

It is an account mode in which you can hold several positions on the same symbol, including a buy and a sell at the same time. Each position has its own ticket.

Can I change my MT5 account from netting to hedging?

No. The mode is fixed on the server when the account is created. You would need to open a new account with the other mode.

What happens if I sell on a netting account while holding a buy?

The sell reduces the buy. If the volumes are equal, the position closes. If the sell is larger, the position reverses into a sell.

Is hedging safer than netting?

No. Locked positions still cost spread and swap, and they still use margin. Your account can still reach stop-out.

Which mode should my EA use?

Use the mode the EA was written and tested for. Check the developer's notes, and test it on a demo account with the same mode first.

Sources

  1. Securities and Exchange Commission of Pakistan (press release, 09.04.2025) · secp.gov.pk › Press Release SECP Cautions Public Against Illegal Offshore Trading an — checked 2026-11-11

Related pages