Netting and hedging account types

By Otto Research 3 min read Article 22 of 95

MetaTrader 5 accounts come in two types, set by the broker when the account is opened. In a netting account there is at most one position per instrument, and any new trade in that instrument is combined with it. In a hedging account each trade is a separate position, and an account can hold several positions in the same instrument, in the same or opposite directions, at the same time.

How netting behaves

If you are long one lot of EUR/USD in a netting account and you buy another lot, you now hold a single position of two lots at the average price. If you instead sell one lot, the position is closed. If you sell two lots, the long is closed and you are left short one lot. There is never more than one position per symbol, and a stop loss or take profit applies to that whole position.

Netting is how exchange-traded accounts work and how most professional systems think. It is simple, and it makes the account's exposure to each market obvious.

How hedging behaves

In a hedging account, buying one lot and then buying another produces two separate positions, each with its own entry price, stop and target. Buying one lot and selling one lot produces a long position and a short position that cancel each other in exposure but continue to exist, each paying its own spread and swap. The account can hold as many positions per symbol as margin allows.

Hedging is what MetaTrader 4 always did, it is what most retail brokers offer by default on MT5, and it is what most retail EAs were written for.

Why the choice matters for a multi-strategy EA

An EA that runs several independent strategies may have two of them active in the same market at once. A daily strategy might be long the US 500 while an hourly strategy is short it, or two strategies might both be long with different stops and targets. In a hedging account each strategy's trade is its own position and the EA manages them separately. In a netting account those trades would be merged into one position, the second strategy's stop could not be attached to "its" trade, and the EA has to reconcile the net position itself, which many EAs cannot do.

For that reason most multi-strategy EAs require a hedging account, and their documentation should say so. Attaching such an EA to a netting account produces orders that behave in ways the EA did not intend and, often, errors in the log.

Worked example

Strategy one buys 0.20 lots of US500 with a 100-point stop. Two hours later strategy two sells 0.10 lots of US500 with a 40-point stop. In a hedging account the account now holds a 0.20 long and a 0.10 short, each with its own stop, and when strategy two's stop is hit only its 0.10 short closes. In a netting account the second order reduces the long to 0.10 lots, strategy two's stop cannot exist as a separate order, and when strategy one later tries to close "its" 0.20 lots there are only 0.10 to close.

What this means when an EA is trading

Check the account type before installing an EA, and if the EA specifies one, open that type. The type is shown in the account details in MetaTrader 5 and can usually be chosen when the account is opened; it cannot be changed afterwards without opening a new account. In the UK, the FIFO rules that constrain hedging in some jurisdictions do not apply, and a hedging account is freely available.

A hedging account also allows an EA to hold a long and a short in the same market at once. That is a legitimate consequence of independent strategies disagreeing, and it costs a little in spread and swap while it lasts. It is not the same thing as the "hedging" some EAs use to avoid taking a loss, which is covered on the grid and martingale page.

From theory to live

See it put to work.

The concepts on these pages are what Otto is built on. Watch it trade them live, on real accounts.