Brokers & accounts

Hedging vs netting accounts in MetaTrader 5: differences and how to check yours

Published November 20, 2026 · By the AUREUM team · 12 min read

On a netting account in MetaTrader 5 there can be only one position per symbol: each new trade increases it, reduces it, closes it or reverses it. On a hedging account, each trade opens a separate position, and you can hold several on the same symbol, even a buy and a sell at the same time. Your broker sets the mode for each account, and MT5 writes it in the “Journal” every time you connect. Here’s what changes, with gold examples, how to check which one you have and what it means for an Expert Advisor. It’s a guide, not a recommendation: neither one is better.

What is netting in MT5, and how is a hedging account different?

MetaTrader 5 keeps track of your positions in one of two ways. The help from MetaQuotes, the company behind the platform, puts it this way: “The system used depends on the account and is set by the broker.”

Which one applies in each market? The reference for MQL5, MT5’s language, distinguishes three account modes: netting and hedging, both for over-the-counter markets, and the exchange mode, which also has one position per symbol. In other words, exchange-traded stocks and futures use netting, and in forex and CFDs the broker chooses. Gold at MT5 brokers is usually a CFD, so your account can be either type.

And one caveat: “hedging” is the name of the system, not a form of protection. A buy and a sell of the same size leave your exposure to the price at zero, but they don’t remove the costs or the risk.

Hedging vs netting: the same orders, with gold examples

The examples use gold (XAU/USD) with the usual contract of 100 ounces per lot: 0.10 lots is 10 ounces, and every dollar the price moves is $10 (what a lot is in gold trading). No spread, commissions or swaps.

The same orders on a netting account and on a hedging account in MetaTrader 5 (gold, 100 ounces per lot)
What you doNettingHedging
You buy 0.10 at $4,000.00 and another 0.10 at $4,010.00One 0.20 position at $4,005.00, the average priceTwo 0.10 positions: one at $4,000.00 and one at $4,010.00
You buy 0.10 and then sell 0.05A 0.05 buy: the other half has been closedTwo positions: a 0.10 buy and a 0.05 sell
You buy 0.10 and then sell 0.10No position: the buy has been closedTwo opposite 0.10 positions: nothing has been closed
You buy 0.10 and then sell 0.20A 0.10 sell: the buy has been closed and the position has been reversedTwo positions: a 0.10 buy and a 0.20 sell

According to the MetaTrader 5 help. Weighted average price in the first row: (4,000 × 0.10 + 4,010 × 0.10) ÷ 0.20 = 4,005. The same goes for a pending order that gets triggered.

The exposure is the same in both columns: in the second row, either way you gain or lose like someone who is long 0.05 lots. What changes is what’s left in the account:

Stop loss, partial close, Close By and margin: what changes when you manage a position

Managing a position on netting and on hedging, according to the MetaQuotes documentation
What you look atNettingHedging
Stop loss and take profitOne set for the whole symbol: the position’sEach position has its own
ClosingAn opposite trade of the same volume, or “Close Position”“Close Position” on that position: an opposite order would open another one
Partial closeAn opposite trade of a smaller volume“Close Position” with a smaller volume
“Close By”Doesn’t existCloses two opposite positions against each other
Margin for a buy and a sell at the same timeCan’t happen: they’re nettedThe broker sets it in the symbol’s “Hedged margin” field

Stop loss on netting: the last order rules

On both accounts, the stop loss and the take profit belong to the position and, when they’re hit, they close all of it (what a stop loss is and what a take profit is). But on netting there’s only one position. According to the MetaQuotes help, when you increase it or reverse it, its levels become those of the last order, and if that order has none, they’re deleted. A partial close doesn’t touch them.

An example: you’re long 0.10 lots with the stop at $3,980.00 and another 0.10 buy comes in without a stop. Now you have 0.20 lots with no stop. By hand it’s hard to end up there: MT5’s order window fills in the levels you already had, and one-click orders don’t change them. But the rule applies just the same to an Expert Advisor, which sends whatever it’s programmed to send. On hedging, the first buy would keep its stop.

Close By: closing a position against its opposite

It only exists on hedging. It closes two opposite positions on the same symbol at once, one against the other; if the volumes differ, the difference stays open. In MT5: double-click the position in the “Trade” tab (or right-click → “Close Position”); in the “Type” field choose “Close By”, then pick the opposite position, and confirm.

It’s there to save one spread. Say you have a 0.10 buy at $4,000.00 and a 0.10 sell at $4,010.00. With Close By, the result is that of buying at 4,000 and selling at 4,010: $10 × 10 ounces = $100, wherever the price is. Closed separately, with gold at $4,020.00 and an example spread of $0.50, the buy closes at 4,020.00 (+$200) and the sell at 4,020.50 (−$105): $95. The missing $5 is that spread, $0.50 × 10 ounces.

Margin on opposite positions

With gold at $4,000 and leverage of 1:20, the EU retail cap for gold, 0.10 lots require $2,000 of margin: 0.10 × 100 × 4,000 ÷ 20 (margin, free margin and margin level). On hedging, the margin for a 0.10 buy and a 0.10 sell held at the same time depends on the “Hedged margin” field in the symbol’s Specification (“Market Watch” → right-click the symbol → “Specification”), which can be a fixed amount or a contract size. In the second case, if it’s the full contract, 100, the two together require what one alone does: $2,000, not $4,000. If it’s 0, the hedged volume requires no margin. The broker can also calculate it on the larger side only (“calculate using larger leg”). And both paid their spread when they were opened, and each carries its own swap.

How to check if your MT5 account is hedging or netting

  1. The “Journal”. Open the Toolbox (View menu, or Ctrl+T) and go to the “Journal” tab. Every time MT5 connects it writes a line that starts with your account number and ends in “trading has been enabled - hedging mode” or “… - netting mode”, in English whatever language your platform is in. If you don’t see it, log in again (File → “Login to Trade Account”). If you logged in with the investor password, the line is a different one, “trading has been disabled - investor mode”, and that one doesn’t show the system.
  2. The title bar and the “Navigator”. According to MetaQuotes, the system is also shown in MT5’s title bar (“Hedge” or “Netting”) and in the “Navigator”, next to the account.
  3. When you open a demo account. In File → “Open an Account”, the form for a demo account may include the “Use hedge in trading” checkbox. Checked, the account will be hedging; unchecked, netting. According to the help, the checkbox changes the account types you can choose from: what you see depends on what the broker’s server offers.
  4. On a live account. You don’t choose it in MT5: it comes with the account type you opened. Look for it in the client area or in the account terms; if it isn’t stated there, ask the broker’s support.
  5. From MQL5. A program reads it with ACCOUNT_MARGIN_MODE, whose value is …_RETAIL_HEDGING, …_RETAIL_NETTING or …_EXCHANGE (the exchange mode).

To see the difference with your own eyes, open a demo account and buy the minimum lot of the same symbol twice: two rows in the “Trade” tab means hedging; a single row with the combined volume, netting. That tells you what that demo account is like, not your live account: for the live one the “Journal” is enough, without opening a single trade.

Can you change an MT5 account from netting to hedging?

Not from MetaTrader 5: there is no setting for it, because the system is a property of the account, set by the broker. MetaQuotes settles it in one line: “To open a real account with hedging, contact your broker.” What the broker does then, open another account of the other type for you or change the one you already have, depends on each broker and we haven’t been able to check it: ask its support before taking anything for granted. No robot changes it.

What changes for an Expert Advisor on hedging and netting accounts

An Expert Advisor works with positions, and the account mode decides how many there can be and how they’re identified. That’s why the same code can behave differently on one account and on another, and why some developers state which mode their EA is built for.

Before you attach an EA to a chart

Check three things: which mode the developer asks for, which mode your account has (in the “Journal”) and whether another robot or manual trades will be on that symbol. If the mode doesn’t match, don’t force it: ask the developer and test it first on a demo account of the same type (how to install an Expert Advisor in MetaTrader 5). The mode is decided when you open the account, and it’s not the same as the commercial account type (standard or raw), which is about costs, not positions (account type, leverage and stop out). It’s also one of the details to send if you ask for help (what to send support if your EA isn’t trading).

Where hedging isn’t allowed: the US FIFO rule

The rule we could check at its source comes from the NFA, the self-regulatory organization for the US derivatives industry. Its Compliance Rule 2-43, adopted effective May 15, 2009, says in paragraph (b) that members acting as counterparty to their customers in forex (Forex Dealer Members) may not carry offsetting positions in a customer account and must offset them on a first-in, first-out (FIFO) basis: oldest first. At the customer’s request, they may offset same-size transactions even if there are older ones of a different size. It’s a rule about forex and for those NFA members; we haven’t checked whether it reaches other products, such as gold.

MetaTrader 5 is built to handle that kind of account. Its help cites the NFA as an example of a regulator for which a broker may enable FIFO-only closing, and the MQL5 reference lists two rejections: code 10045, when a close doesn’t follow that order, and code 10046, when the account has opposite positions on the same symbol disabled. An account can be hedging and still not let you hold a buy and a sell at the same time. Outside that case, it depends on the broker and the account type: read it in the account terms.

MT4, MT5 and how hedging came to MetaTrader 5

In MetaTrader 4 there’s nothing to choose: each trade lives on its own, as in MT5’s hedging (timeframes, order types and account modes in MT4 and MT5). MetaTrader 5 started out with netting only. MetaQuotes announced hedging in March 2016, “to expand possibilities of retail Forex traders”, and added it to the desktop platform in April 2016 (builds 1295, released April 1, and 1325, released April 22, 2016).

AUREUM and your account mode: the broker sets it, not the software

AUREUM is an Expert Advisor, software that runs two gold strategies (XAU/USD) in your own MetaTrader 5 account: you install it once and your money stays in your account. Neither AUREUM nor any other robot chooses or changes the position accounting system: it’s set by the broker where you hold your account. This article doesn’t describe its strategy. Every trade opens with its loss and profit limits already calculated; that limits what’s at risk on each trade, not the result. An account running AUREUM can also lose money. AUREUM carries two strategies, and each one can hold its own open trade, sometimes in opposite directions: that’s why its installation guide asks for a hedging account and starts with the broker account (“Your broker account”).

Hedging and netting in MT5: frequently asked questions

What is the difference between hedging and netting in MT5?

On a netting account there is only one position per symbol: each new trade increases it, reduces it, closes it or reverses it. On a hedging account each trade opens a separate position, so you can hold several on the same symbol, including a buy and a sell at the same time. The system is a property of the account and is set by the broker, not by the platform or by an Expert Advisor.

How do I check if my MT5 account is hedging or netting?

Open the Journal tab of the Toolbox (Ctrl+T): every time MT5 connects it writes a line with your account number that ends in “trading has been enabled - hedging mode” or “netting mode”. According to MetaQuotes, it’s also shown in the window title (Hedge or Netting) and in the Navigator, next to the account. On a demo account you choose it when you create the account, with the Use hedge in trading checkbox.

Can you change an MT5 account from netting to hedging?

Not from MetaTrader 5: there is no setting for it, because the broker sets the system for each account. What MetaQuotes says about getting a live hedging account is to contact your broker. Whether the broker opens another account of the other type or changes the one you already have depends on the broker: its support has to confirm it.

What happens if I buy and sell the same symbol on a netting account?

The sell doesn’t open another position: it acts on the one you have. If you bought 0.10 lots and sell 0.05, you’re left with a 0.05-lot buy and the other half is closed with its profit or loss. If you sell 0.10, the position is closed. If you sell 0.20, the buy is closed and you’re left with a 0.10-lot sell: the position is reversed. On a hedging account, the same orders would leave two open positions.

Does an Expert Advisor work the same on hedging and netting accounts?

Not necessarily. An EA that needs several positions on the same symbol won’t get them on a netting account, where everything ends up in a single position with a single stop. And an EA that closes by sending the opposite order closes nothing on a hedging account: it opens another position. That’s why some developers state which system their EA is built for. Before you attach it to a chart, check your account mode in the Journal and test it on a demo account of the same type.

What is Close By in MT5?

It’s an operation on hedging accounts that closes two opposite positions on the same symbol against each other. If the volumes differ, the difference stays open. It saves one spread compared with closing them separately. In MetaTrader 5 it’s in the position window: in the Type field, choose Close By. It doesn’t exist on netting accounts, because there can’t be two opposite positions.

Are there countries where hedging isn’t allowed?

Yes, at least one we could check at the source: in the United States, NFA Compliance Rule 2-43(b) bars Forex Dealer Members from carrying offsetting positions in a customer account and requires them to offset on a first-in, first-out (FIFO) basis. MetaTrader 5 has two account settings that fit that: FIFO-only closing and opposite positions disabled. Elsewhere it depends on the broker and the account type.

Risk warning

The menus, messages and rules in this article were checked in November 2026 with MetaTrader 5 for desktop and with the MetaQuotes documentation; they can change with the platform version, and each account’s conditions (position accounting system, margin on opposite positions, FIFO closing) are set by each broker. The prices and the spread in the examples are made up to show the math. Holding a buy and a sell at the same time doesn’t remove the risk or the costs. Leveraged gold trading, which on MetaTrader 5 brokers is usually done with CFDs, carries a high level of risk and you can lose some or all of your capital: most retail CFD accounts lose money (how many traders lose money). The AUREUM figures we quote come from a simulation (backtest), not from a live account. Past or simulated results do not guarantee future results. This content is educational and is not financial or investment advice.

AUREUM: automated rules on gold, with its backtest published

Software that runs two strategies on XAU/USD in your own MetaTrader 5 account, where every trade opens with its loss and profit limits already calculated. Its 2024–2026 backtest, with both strategies together, is published with its drawdowns: a maximum drawdown of 22.35% across 345 trades. It’s a simulation, not a live account, and trading leveraged CFDs can lose you money.

See the full report →