MT5 hedging vs netting: which account do you have?
Every MetaTrader 5 account keeps its positions in one of two ways, hedging or netting. It decides what a second trade on the same symbol does, and whether Expert Advisors and copiers that track each trade work on the account.
By the Algo Trader Tools team · Updated · 6 min read
The short answer
- Hedging: every trade is a position of its own, so you can hold a buy and a sell on the same symbol at once.
- Netting: one position per symbol. A new trade adds to it, reduces it, closes it or turns it around.
- The broker sets it for each account, and you can't change it. For a hedging account, open a new one of that type.
- Accounts at US-regulated forex brokers are netting: US rules don't allow hedging.
What changes between the two
MetaQuotes describes the two systems in MetaTrader 5's help. On a netting account “you can have only one common position for a symbol at the same time”. A trade the other way reduces that position, closes it when the volumes are equal, or reverses it when the new trade is bigger.
On a hedging account “you can have multiple open positions of one and the same symbol, including opposite positions”. A new trade opens a new position and leaves the others as they are.
The same three trades on EURUSD end up like this:
| Trade | Hedging account | Netting account |
|---|---|---|
| Buy 1.00 | Buy 1.00 | Buy 1.00 |
| Sell 0.40 | Buy 1.00 and sell 0.40, two positions | Buy 0.60, one position |
| Sell 1.00 | Buy 1.00, sell 0.40 and sell 1.00, three positions | Sell 0.40, one position |
A pending order behaves the same way once it fills: on a netting account it changes the one position, on a hedging account it opens a new one.
How to tell which one you have
- Look at the Trade tab. If you hold two trades on one symbol, a hedging account lists them as two rows. A netting account shows a single row.
- Look at the window title. Many MT5 builds show “Hedge” in the title for a hedging account.
- Ask the broker, or read the account type on its site. Brokers often name hedging and netting account types separately.
- In code, AccountInfoInteger(ACCOUNT_MARGIN_MODE) returns ACCOUNT_MARGIN_MODE_RETAIL_HEDGING on a hedging account. Test for that value: a third mode, ACCOUNT_MARGIN_MODE_EXCHANGE, used for exchange markets, also keeps one position per symbol.
Every MetaTrader 4 account is a hedging account; the choice only exists on MT5.
Can you switch an account?
No. MetaQuotes' help says the system “depends on the account and is set by the broker”. An existing account keeps its type, so for a hedging account you open a new one, at a broker that offers it.
Brokers regulated in the US can't offer one: US rules require trades on a symbol to close first in, first out and don't allow opposite positions, so their MT5 accounts are netting.
Which one do copiers and Expert Advisors need?
Anything that tracks its own trades one by one works best on hedging. On a netting account, a copier's trade and your own trade on the same symbol merge into one position, so neither can be closed on its own, and an Expert Advisor that opens a buy and a sell of the same size ends up with no position at all.
Our copier needs hedging accounts on MT5, master and followers. Each copy is a position of its own, tagged with the master's ticket, so the copier can close exactly that copy, take part of it off, or find it again after a restart. A netting account can still be connected to watch its balance, equity and history, but it can't be part of a copier. The MT5 trade copier page has the rest of what a copy needs.
Copying into a prop firm account on MT5? Check that the firm gives you a hedging account before you buy the challenge, and see what else to ask the firm.