Hedging vs netting in MT5: two account modes, and what a lock really costs

MT5 accounts count positions by netting or by hedging. What an opposite order does on each, and why a lock freezes a loss without ever closing it.

OCT/8/2026 · 7 min readBy the ForexCommand team · Methodology · Standards
Hedging vs netting in MT5: two account modes, and what a lock really costs

A MetaTrader 5 account counts your positions in one of two ways. Netting keeps a single position per symbol, so an opposite order shrinks it, closes it or flips it. Hedging lets you hold several positions on the same symbol, a buy and a sell included. The mode belongs to the account, and hedging's best-known use, the lock, freezes a losing trade as surely as closing it would, then keeps costing you.

Each one in one sentence

  • Netting: one position per symbol, and every new deal on that symbol adds to it, shrinks it, closes it or reverses it.
  • Hedging: each deal can open a position of its own, so a buy and a sell of the same pair can sit side by side.

Neither mode changes the price you get or the market you trade. It changes what happens when you send an order on a pair where you already hold a position.

Where the two modes come from?

Until build 1325, released on 22 April 2016, MetaTrader 5 counted positions only one way, by netting. That build added hedging, and MetaQuotes, the company behind the platform, described it in its release notes for build 1325 as similar to the system MetaTrader 4 uses, and as opening the way to strategies based on locking.

The mode is set for the whole account, not chosen trade by trade. The same release notes say where to look: the terminal shows it in the window header and in the Journal. For programs, the account property is `ACCOUNT_MARGIN_MODE`, which MetaQuotes documents as retail netting, exchange or retail hedging.

The same order, two results

You hold 1.00 standard lot long EUR/USD and send one more order on the same pair. This is what each mode does with it, following the platform's own description of the two systems:

You sendNetting accountHedging account
Sell 0.50Your position shrinks to long 0.50A short 0.50 opens; the long 1.00 stays as it was
Sell 1.00Your position is closedA short 1.00 opens beside the long 1.00
Sell 1.50Your position is reversed to short 0.50A short 1.50 opens beside the long 1.00
Buy 0.50Your position grows to long 1.50A second long position of 0.50 opens

On a hedging account, an opposite order never closes anything: a new position opens and the one you had does not change. To close a position you have to select it and close it explicitly.

Netting has a quieter trap of its own. When the position grows or is reversed, its stop loss and take profit are set by the latest order, so adding to a trade with a different stop moves the stop of the whole position.

What a lock really does

A lock is the hedging account's best-known use: the trade goes against you, and instead of closing it you open the same volume the other way. The appeal is that the loss stops growing. What it does not do is stop being a loss.

Take a 1.00-lot buy of EUR/USD that is 30 pips under water. At roughly $10 a pip on one standard lot, as our breakdown of what a trade really costs works out, that is about $300. You lock it with a 1.00-lot sell.

From that moment, every pip the price moves adds to one leg exactly what it takes from the other. The $300 is now fixed: it is what you would have booked by closing the buy at the price you sold at.

The account shows a little more than that, because the sell leg is still valued at the price you would pay to close it, one spread away. The lock did not save the $300. It fixed it, and left it open.

What it costs from there:

  • The swap, on both legs. Each position pays or earns its own swap every night. On our reference figures, the interest-rate differential alone puts a long EUR/USD lot at about $4.70 a night as of 23 September, $32.90 over a week with the usual triple Wednesday, and the broker's markup comes on top. The short leg earns at most that differential, and only before the markup, which is charged on both sides. The best case is that the two cancel; the usual case is that they do not.
  • A second spread on the way out. Closing the two legs one by one pays the spread again, at whatever width it has at that moment: about $8 on one lot of EUR/USD at 0.8 pips. The platform's Close By operation, available only on hedging accounts, closes each leg at the other's opening price, so that second spread is not paid.
  • Margin that the broker decides. MetaTrader 5 can charge a fixed hedged margin per locked lot, set in the symbol's contract specification, or calculate it on the larger leg. That setting can mean no margin at all on the locked volume or the margin of a full lot. Which one, and how much, is your broker's setting, not the platform's.
  • An equity that still moves. A locked account is still marked at the bid and the ask, so its equity dips whenever the spread widens, which it does at the daily rollover and in hours of thin liquidity, as our explainer on the overnight spread shows. A lock is not a position the market cannot touch.

And the decision is still waiting. Close By takes you out flat, with the loss booked. To come out with a direction instead, you remove one leg first, and at that moment the other is a naked position again, at whatever price the market has by then.

Then which mode should you trade on?

If you hold one position per pair and set a stop, the two modes behave the same. The difference only appears when you want two positions on the same symbol at once.

  • Hedging fits strategies that keep trades apart. An Expert Advisor that runs independent strategies on the same pair needs each one to be its own position, with its own stop. On netting they would merge into one.
  • A program written for one mode can misbehave on the other. MetaQuotes' documentation says that on a hedging account the standard `PositionSelect` call picks the position with the lowest ticket. Code that assumes one position per symbol will act on whichever one that is. Worth asking before you buy a robot.
  • Netting makes you look at the loss. An opposite order closes the trade, so there is no lock to hide in. The loss is booked when you decide, not parked.

In the United States the choice is not yours to make. The National Futures Association (NFA), the self-regulatory organization of the US derivatives industry, sets it in its Compliance Rule 2-43(b): Forex Dealer Members (FDMs), the forex dealers that are NFA members, may not carry offsetting positions in a customer account and must offset them on a first-in, first-out basis. At the customer's request, an FDM may offset a same-size position out of that order, but only against the oldest one of that size.

What this does not tell you

  • We have no account data. We do not see brokers' accounts or how many traders use each mode, so nothing here measures how common locking is or how it ends.
  • The figures are reference points, not quotes. The $8 spread, the $4.70 swap and the $10 pip come from our cost breakdown on EUR/USD. Your broker's spread, swap markup and hedged margin are in its contract specifications.
  • One platform only. This is how MetaTrader 5 counts positions. MetaTrader 4, cTrader and others have their own rules, and we have not checked them here.
  • Not legal advice. Whether your broker may offer hedging depends on where it is regulated and where you are.

What should you do with this?

  • Check your mode before your next order. Look at the window header or the Journal. An opposite order does opposite things on the two accounts.
  • Do not use a lock as a stop. It fixes the loss without closing it, then charges swap on two positions. If the trade is wrong, close it.
  • If you already have a lock open, decide how you want out. Flat, with Close By, which saves you the second spread. Or with a direction, which means choosing which leg goes first, and why.
  • Ask which mode a robot was written for. A program that assumes one position per symbol can misbehave on a hedging account.
Share:

Get the analysis, free

You choose how often. We confirm your email, and you can unsubscribe in one click anytime.

How often?

Your email stays private. Unsubscribe anytime.

Related posts

Latest posts