Running two or three Expert Advisors on the same MetaTrader 5 account is common: one breakout EA, one trend EA, maybe a mean-reversion EA on a different timeframe. It works, but only if each EA can tell its own trades apart and you add up the risk of all of them together. This guide covers magic numbers, hedging vs netting accounts, how much risk several gold EAs really take at once, and a simple setup checklist.
One chart, one EA
MT5 allows one EA per chart. To run a second EA on XAUUSD, open a second XAUUSD chart (File, New Chart) and attach it there. Both EAs then trade the same symbol on the same account balance. The timeframe of the chart is what the EA reads, so you can run one EA on H1 and another on M15 of the same symbol. To keep a dozen charts manageable, save the setup as a profile (File, Profiles, Save As) so you can restore it after a restart or move it to a VPS.
What a magic number does
Every order an EA sends carries a magic number, a whole number chosen in the EA's inputs. MT5 stores it with the position. When the EA later asks "do I already have a trade open?", "which stop should I trail?" or "how many trades did I open today?", a well-written EA counts only positions with its own symbol and its own magic number. Manual trades have magic number 0.
If two EAs share a magic number on the same symbol, they can see each other's trades. Typical results:
- An EA with a "one trade at a time" rule sees the other EA's position and skips its own signal.
- A trailing-stop or break-even routine moves the stop of a trade it did not open.
- A "close all at 20:00" or daily loss routine closes positions that belong to the other EA.
- Per-EA statistics, such as trades per day, get mixed up.
The fix is simple: give every EA instance a different magic number, including two copies of the same EA on different timeframes. The GoldLab EAs list the field in their input table; the Supertrend Rider EA ships with 20271005 and the Keltner Reversion EA with 26100901, and both say to change it when you run several copies. A readable scheme helps later, for example 1101 = EA 1 on XAUUSD H1, 1115 = EA 1 on M15, 1201 = EA 2 on H1. Write the list down; MT5 will not remind you which number belongs to which EA.
Hedging or netting account: check this first
MT5 accounts come in two position modes, and the difference matters far more when several EAs share a symbol.
| Mode | Positions per symbol | What happens with two EAs |
|---|---|---|
| Hedging | Many, each separate | Each EA's trade is its own position with its own stop loss, take profit and magic number. EA A can be long while EA B is short. |
| Netting | One | All XAUUSD orders merge into one position. A 0.20 lot sell from EA B against a 0.10 lot buy from EA A leaves a single 0.10 lot sell, and the position has one stop loss and take profit for everyone. |
Most retail forex and CFD accounts are hedging, but not all. The account mode is shown in the MT5 window title and in the account details. On a netting account, running several EAs on the same symbol rarely behaves the way each EA's backtest did, so either use separate symbols or a hedging account.
Total risk: add the EAs together
Each EA usually sizes its trade from its own risk setting, for example 1% of balance. Three EAs at 1% each do not mean 1% risk on the account. If all three are in a trade at once, the open risk is up to 3%. Lot size per trade is risk ÷ (stop distance × 100 oz), the same formula used by the XAUUSD lot size calculator.
Worked example on a 10,000 USD account, three EAs all at 1% (100 USD each), all long gold at about the same price:
| EA | Stop distance | Lot size | Loss if gold falls 10 USD |
|---|---|---|---|
| A, breakout | 10 USD | 0.10 | 100 USD (stopped out) |
| B, short-term | 5 USD | 0.20 | 100 USD (stopped out at 5 USD) |
| C, swing | 20 USD | 0.05 | 50 USD (still open) |
| Total | 0.35 | 250 USD = 2.5% |
One 10 USD move, which gold can make in a single news candle, costs 2.5% of the account, and 3% if it keeps going to C's stop. None of the three EAs did anything wrong on its own; the risk came from running them together.
A quick worst-case table, assuming every EA is in a trade in the same direction:
| EAs on gold | Risk per EA | Worst-case open risk |
|---|---|---|
| 2 | 1% | 2% |
| 3 | 1% | 3% |
| 3 | 0.5% | 1.5% |
| 5 | 1% | 5% |
Five EAs at 1% can reach 5% in one move, which equals the daily loss limit of many prop firm challenges (see using a gold EA on a prop firm account). A practical approach is to decide the total first, say 2% open risk for the whole account, then divide it: 4 EAs at 0.5% each. The 1% risk rule guide shows how quickly loss streaks add up at each level.
Correlation: different EAs, same market
Two EAs with different rules on the same symbol are not independent bets. They read the same price. On a strong down day a breakout EA, a trend EA and a moving-average EA may all end up short, or all get stopped out of longs, together.
Some rough numbers for two EAs that each win 40% of trades:
- If their trades were fully independent, the chance both lose on the same day would be 0.6 × 0.6 = 36%.
- If they take the same signal at the same time, they win and lose together, so both lose 60% of the time and the combined result is just one larger position.
Real EAs sit between these two. Pairing different styles, such as a trend follower with a mean-reversion EA, or a session EA with one that trades other hours, usually lowers the overlap; running three trend-following EAs on H1 gold mostly multiplies one bet (the styles are compared in breakout vs trend vs mean reversion EA). You can check this in your own data: export each EA's backtest on the same period and compare the days with losses. If most losing days line up, treat them as one EA for risk.
Margin and the account-level stop
Margin also adds up. In the example above, 0.35 lot at a gold price of 4,200 USD is 35 oz × 4,200 = 147,000 USD of exposure. At 1:100 leverage that needs about 1,470 USD of margin; at 1:500 about 294 USD. Check the total with the margin calculator. Margin is rarely the limit on a 10,000 USD account, but on a 500 USD account several EAs at the broker's minimum lot can push the margin level toward a stop out.
Daily loss limits are also per EA. If each of three EAs stops itself after a 3% daily loss, the account can still lose 9% in a day. If you need an account-wide limit, it has to come from one place that watches total equity, not from each EA separately.
Setup checklist
- Confirm the account is hedging if more than one EA trades the same symbol.
- Give every EA instance a unique magic number and keep a written list.
- Set each EA's risk from a total budget (for example 2% open risk across all EAs), not 1% each by habit.
- Check the symbol name on every chart (XAUUSD, XAUUSDm, GOLD) and the minimum lot. At 0.01 lot minimum, a tiny risk setting on a small account may be rounded up.
- Backtest each EA on the same dates and compare the losing days for overlap.
- Run them together on a demo account for a few weeks and check the Experts tab for errors such as "not enough money" or trades being closed by the wrong EA.
- If you move them to a VPS, migrate the whole profile once and keep the home copies with Algo Trading off (see do you need a VPS for an MT5 EA).
Key takeaways
- MT5 runs one EA per chart; open another chart of the same symbol for a second EA.
- A unique magic number per EA instance stops EAs from managing or counting each other's trades.
- On a netting account all orders on a symbol merge into one position, so check for hedging mode first.
- Three EAs at 1% each can be 3% open risk at once; set a total budget and divide it.
FAQ
Can I run two EAs on the same chart in MT5?
No. MT5 allows one Expert Advisor per chart. Open a new chart of the same symbol and timeframe for the second EA. Indicators and scripts can still be added to a chart that already has an EA.
What happens if two EAs use the same magic number?
If they also trade the same symbol, each EA may treat the other's trades as its own. That can block new entries, move the wrong stop loss, or close the other EA's positions at its exit time. Give every EA instance a different magic number to avoid this.
Can I run the same EA twice on one account?
Yes, for example on two timeframes or two symbols, as long as each copy has its own magic number and you count both in your total risk. On the same symbol and timeframe with the same settings it simply doubles the position size.
How much risk should each EA use if I run several?
Decide the maximum open risk for the whole account first, then divide it. For example, 2% total across four EAs is 0.5% each. If the EAs often trade gold in the same direction at the same time, treat them as one larger position.
Do multiple EAs work on a netting account?
On different symbols, yes. On the same symbol, all orders merge into one position with one stop loss and take profit, so one EA's trade can reduce, reverse or change the protection of another's. A hedging account is the safer choice for several EAs on XAUUSD.
For education only, not investment advice. Trading gold and CFDs is high risk and you can lose your capital.