Account setup
Hedging vs Netting Accounts in MT5: Which One Your Expert Advisor Needs and How to Check
By Benjamin Lee · Updated · 7 min read
An Expert Advisor can work perfectly on one account and behave strangely on another because of a setting most buyers never look at: whether the account is a hedging or a netting account. The difference decides whether the EA can hold opposite positions, how its orders combine, and whether grid and hedge strategies work at all. This guide explains both modes in plain language, shows what changes for an EA, and gives you a way to check your account before you buy or install anything.
Key takeaways
- A hedging account allows several positions on one symbol, including buys and sells at the same time.
- A netting account keeps one net position per symbol. New orders add to, reduce or reverse it.
- Grid, hedge and recovery EAs usually need a hedging account. Many simple EAs work on both.
- Your broker sets the account mode when the account is opened. You usually cannot change it in the terminal.
- Check the account mode with the broker before you buy an EA that depends on it.
The two modes in plain language
MetaTrader 5 supports two ways of accounting for open trades. In hedging mode, each trade you open is its own position. You can hold a buy and a sell on the same symbol at the same time, and each has its own stop loss and take profit. In netting mode, the terminal keeps a single position per symbol. If you hold a buy of 1 lot and then open a sell of 1 lot, the two cancel and you have no position. MetaQuotes explains positions, deals and the difference between the modes in its help pages on trading operations.
| Question | Hedging account | Netting account |
|---|---|---|
| Positions per symbol | Many, independent of each other | One net position |
| Buy and sell at once on one symbol | Yes, both stay open | No, they offset each other |
| Separate stop loss per trade | Yes | One stop and target for the whole position |
| Partial close of one trade | Closes that trade only | Reduces the net position |
| Typical use | Forex and CFD brokers, grid and hedge EAs | Exchange-style markets and some brokers |
| Margin on opposite positions | Depends on the broker; some charge reduced margin for hedged volume | Margin only on the net volume |
What changes for an Expert Advisor
An EA that opens trades in one direction with its own stop loss behaves much the same in both modes, as long as it does not open a second trade on a symbol while the first is open. As soon as an EA adds to a position, or holds opposite trades, the modes diverge.
- Grid EAs add positions as price moves. On a hedging account each level is its own trade. On a netting account the levels merge into one position with an average price, so the EA's per-level take profit and stop loss logic breaks.
- Hedge and recovery EAs open an opposite trade to lock a loss. On a netting account the opposite trade simply closes the original, so nothing is locked.
- Two EAs on one symbol can fight on a netting account: one buys while the other sells, and the net position shrinks or flips. On a hedging account both trades stay open. Use separate magic numbers and be careful anyway.
- Simple one-trade EAs that wait for a trade to close before opening another work in either mode.
- Partial closes and trailing stops are applied per trade on hedging accounts and to the whole position on netting accounts.
How to check your account mode
Step 1: Ask the broker or read the account details
The broker's client area or account opening page usually states whether the account is hedging or netting. Support can confirm in writing.
Step 2: Look at the trade tab
On a hedging account, opening two trades on one symbol shows two lines in the Trade tab. On a netting account, a second trade in the same direction increases the volume of the single line.
Step 3: Test on a demo with the same account type
Open a demo with the same broker and account type, open a buy and then a sell on the same symbol, and watch whether both stay open. Close them both afterwards.
Step 4: Read the EA's manual
It will say whether it needs hedging, whether it supports netting, and what to do if the account type is wrong.
Account mode is set when the account is created. If you have the wrong type, the usual fix is to open a new account of the right type with the broker, not to change a setting. Note that many brokers offer both modes on the same platform, so ask for the one that suits your EA.
Margin and risk on hedged positions
On a hedging account, holding a buy and a sell of equal size on one symbol locks the price exposure, but not the cost. Spread has been paid on both trades, swap accrues on both, and the margin treatment depends on the broker. Some charge no margin on the hedged volume, others charge for both sides. A locked position is also not a closed position: when you remove one side, the other is exposed. EU brokers apply the same leverage limits to either mode, as covered in EA trading in Europe.
A recovery EA that hedges and then re-enters can look safe in a backtest and still fail in practice when the spread widens or the broker restricts hedging. Test it on the broker's account type, as explained in the grid and martingale risks.
Which one should you choose?
| EA type | Hedging account | Netting account |
|---|---|---|
| Single trade at a time, with stop loss | Works | Works |
| Multiple independent entries per symbol | Works | Entries merge; check the manual |
| Grid or averaging | Usually required | Generally unsuitable |
| Hedge or recovery | Required | Does not work as designed |
| Multiple EAs on one symbol | Works with unique magic numbers | High risk of conflict |
If the EA's page does not state the account type, ask the seller before you pay. Our buying checklist includes this question, and the MT5 Expert Advisors guide shows where it fits in the setup.
A worked example: the same grid on two account types
Take a grid EA that buys 0.10 lots of EURUSD at 1.1000, adds another 0.10 at 1.0980 and another at 1.0960, each with its own take profit 20 pips above its entry. On a hedging account there are three separate positions. When price recovers to 1.0980 the second position hits its take profit and closes alone, banking 20 pips on 0.10 lots, about 1.74 euros at 1.15. On a netting account the three buys merge into one 0.30 lot position with an average entry near 1.0980. The EA's separate take profits no longer exist, so the whole position closes only when the single net target is reached. The strategy the author tested is not the strategy you are running.
The same difference appears with partial profit-taking, trailing stops per entry and any rule that manages individual tickets. If the manual talks about managing each order or level separately, assume it needs hedging.
Common mistakes with account mode
- Buying a grid or hedge EA before checking the account type with the broker.
- Assuming a demo account has the same mode as the live one. Check each separately.
- Opening a second account with the same broker and not noticing it is a different mode.
- Running an EA and manual trades on the same symbol on a netting account, so that a manual order changes the EA's position.
- Expecting a locked position to carry no risk. Spread and swap are paid on both sides, and the locked pair is exposed when one side closes.
- Ignoring the broker's rules on hedging. Some limit or forbid opposite positions.
Sources and further reading
- MetaTrader 5 Help: Basic Principles of Trading OperationsOrders, deals and positions, and how netting and hedging accounts differ.
- MetaTrader 5 Help: Expert Advisors and Custom IndicatorsHow Expert Advisors and custom indicators work in the terminal.
- MQL5 Reference: Trade Request StructureThe magic field an Expert Advisor uses to tag its own orders.
Frequently asked questions
What is the difference between hedging and netting in MT5?
A hedging account keeps each trade as a separate position, so you can hold buys and sells on one symbol at once. A netting account keeps a single net position per symbol, so opposite trades offset each other.
Do I need a hedging account for an EA?
Grid, hedge and recovery EAs generally do. Simple EAs that hold one trade at a time work on both. The EA's manual should state the requirement.
Can I switch my account from netting to hedging?
Usually not within the same account. The mode is set when the account is opened, so you normally open a new account of the right type with the broker.
Why did my EA close a trade it should have kept?
On a netting account an opposite order can reduce or close the existing position. Check the account mode, the EA's magic number and whether another EA traded the same symbol.
Is hedging allowed for EU retail traders?
Retail accounts at EU brokers commonly offer hedging, but policies vary by broker. Check the broker's terms and account types before you open one.
Expert Advisors in these styles
Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.
Keep reading
- Buying guideEA Buying Checklist: 15 Questions to Ask Before You Pay15 questions to ask before buying an MT5 Expert Advisor: who built it, licence terms, backtest proof, risk logic, support and refunds, with a printable checklist.
- Pillar guideMT5 Expert Advisors: The Complete Guide for BeginnersEverything about MetaTrader 5 Expert Advisors in one place: how they work, strategy types, risk, backtesting, buying safely, gold, EURUSD, prop firms and Europe.
- EuropeEA Trading in Europe: ESMA Leverage Limits and RulesWhat ESMA's CFD rules mean for Expert Advisor traders in the EU: 30:1 leverage, 50% close-out, negative balance protection, and how to choose a broker.
- Gold EAsBest Gold EA for MT5: How to Choose One (Checklist)How to pick a gold (XAUUSD) Expert Advisor for MT5: strategy type, spread tolerance, drawdown, proof to ask for, and a 12-point checklist before you pay.


