Home > Blog > Running Multiple EAs Simultaneously: Risk Management for Lot Sizing, Margin, and MagicNumbers

EARisk ManagementPortfolioMT5Trading Settings

Running Multiple EAs Simultaneously: Risk Management for Lot Sizing, Margin, and MagicNumbers

Published: 2026-05-18Read time: about 5 min
This article reflects information as of its publish date. EA performance figures (PF, DD, annual return) change with live trading and re-validation — check the latest on the EA pages. See the latest EA results

Running Multiple EAs Simultaneously: Risk Management for Lot Sizing, Margin, and MagicNumbers

MT5 allows you to run multiple EAs on the same account at the same time. But simply stacking EAs is not enough — misconfiguring even a few settings can cause risk to balloon unexpectedly, or cause EAs to interfere with each other and malfunction.

This article covers the most common problems that arise when running multiple EAs simultaneously, along with practical guidance on how to configure each one correctly.

Why Run Multiple EAs? Clarifying the Goal

The premise is straightforward: the purpose of running multiple EAs is risk reduction through diversification. Running several EAs that all use the same strategy on the same currency pair does not constitute diversification. Meaningful multi-EA operation requires:

  • Different strategy types (trend-following + breakout + mean-reversion)
  • Different timeframes (H1 + D1, etc.)
  • Different currency pairs (XAUUSD + EURUSD + USDJPY)

By combining these dimensions, you maintain a state where "at least one EA is working" regardless of how market conditions shift.

[Critical] Preventing MagicNumber Conflicts

The very first thing to configure in a multi-EA setup is avoiding duplicate MagicNumbers.

A MagicNumber is the identifier MT5 uses to track and manage positions. Assigning the same MagicNumber to two different EAs causes:

  • EA-B incorrectly recognizing EA-A's positions as its own and closing them
  • EA-A's risk calculations being distorted by EA-B's positions, resulting in incorrect lot sizing

To prevent this, always assign a unique MagicNumber to each EA.

GOLD EMA ATR EA    : MagicNumber = 20260515
GOLD Asia Range    : MagicNumber = 20260518
GOLD MTF Trend     : MagicNumber = 20260520
EURUSD EMA RSI     : MagicNumber = 20260523

Using a consistent numbering scheme (such as date + sequence number) makes it easy to identify each EA at a glance later.

Calculating Combined Risk

If each of three EAs is set to "1% risk" and all three enter a trade simultaneously, your combined risk at that moment is 3%.

The generally accepted safe standard for individual traders is "never risk more than 1–2% of account balance on a single trade." With three EAs running, reducing each one to 0.5–0.7% per trade is a realistic approach.

Example Calculation (Account Balance: $10,000)

EARisk %Max Loss per Trade
GOLD EMA ATR EA1.0%$100
GOLD Asia Range Break1.0%$100
GOLD MTF Trend1.0%$100
Combined (all 3 EAs entering simultaneously)3.0%$300

Confirm in advance that you can psychologically tolerate this. There is a real possibility of losing 3% of your account balance in a single trading day.

Number of EAsRisk % per EAMax Combined Risk
11.0%1.0%
20.7%1.4%
30.5%1.5%
4 or more0.3–0.4%1.2–1.6%

Monitoring Margin Maintenance Level

When multiple EAs hold positions simultaneously, margin is consumed rapidly. Gold (XAUUSD) in particular requires a large margin deposit per lot, so special care is needed.

Margin Maintenance Level Guidelines

Maintenance LevelStatus
500% or aboveComfortable. New positions are acceptable.
200–500%Normal operating range.
100–200%Caution. Reduce new entries.
100%Margin call level (additional margin required).
Below 50%Danger zone for forced stop-out.

The EAs on this site include a UseMarginCheck = true / MinMarginLevel = 200.0 setting. When this is enabled, the EA will automatically stop entering new trades if the maintenance level falls below 200%. It is strongly recommended to enable this setting on all EAs when running multiple EAs simultaneously.

Setting a Daily Maximum Loss

By configuring MaxDailyLossPct on each EA, the EA will automatically halt when losses on that day reach a set threshold.

MaxDailyLossPct = 3.0  → Auto-stop when 3% of account balance is lost

With three EAs running, setting 2–3% on each means the system halts "before a combined total of 9% is lost." Note that this only stops new EA activity for that day — existing open positions will remain open.

Chart Setup and Monitoring

Practical steps for monitoring multiple EAs in MT5:

1. Check All EA Activity in the Expert Tab

Click the "Experts" tab at the bottom of MT5 to see a time-stamped log for all EAs. Check regularly for errors or warnings.

2. View Open Positions in the Terminal's "Trade" Tab

The "Trade" tab displays a list of all currently open positions. You can identify which EA owns each position by looking at the Comment column (or MagicNumber column).

3. Check Balance and Margin Level in the Account Info Panel

The "Account Info" panel in the upper-left of MT5 shows your balance, free margin, and maintenance level in real time. Pay particular attention to the maintenance level column when running multiple EAs.

Accounting for Time Zone Overlap

Different EAs concentrate their trading activity at different times of day:

EAPrimary Trading Hours
GOLD EMA ATR EAOn H1 bar close (all day)
GOLD Asia Range BreakLondon Open (08:00–12:00 server time)
GOLD MTF TrendOn H1 bar close (after D1 trend confirmation)
EURUSD EMA RSIEuropean and NY sessions
GBPUSD ScalpLondon session (M15)

Asia Range Break and GBPUSD Scalp are both concentrated around the London Open, so multiple positions are likely to open simultaneously during that window. Calculate the combined risk for that period in advance.

Pre-Live Checklist

Items to confirm before going live with multiple EAs:

  • Have all EAs been assigned unique, non-duplicate MagicNumbers?
  • Does the combined RiskPercent across all EAs stay at or below 2%?
  • Has UseMarginCheck = true / MinMarginLevel = 200 been set on all EAs?
  • Has MaxDailyLossPct been configured on each EA?
  • Have you run at least one week of parallel testing on a demo account?
  • Have you confirmed there are no errors in the MT5 Experts tab?
  • Have you individually run a 10-year MT5 Strategy Tester backtest on each EA?

Summary

The heart of multi-EA risk management is preventing MagicNumber conflicts and managing combined risk. Risks that seemed manageable with a single EA can escalate sharply once multiple EAs are in play.

Test everything on a demo account first, confirm that all EAs are running without issues for at least one week, and only then go live. Set your risk management rules in advance and stick to them — avoiding emotional decisions is the key to long-term success.


FAQ

Q: Is it okay to run two EAs on the same currency pair?

Running multiple EAs on the same currency pair is technically possible, but you must assign each a different MagicNumber. Also be aware that if positions in the same direction overlap on the same pair, margin consumption doubles. It is advisable to reduce the lot percentage on each EA (for example, 0.5% each), or use a OneTradePerDay setting to prevent same-day duplication.

Q: Can two EAs end up canceling each other's positions?

As long as MagicNumbers are different, each EA operates independently. However, if EA-A holds a long position and EA-B holds a short position simultaneously, the net economic result is a hedge (cancellation), but you still incur spread costs on both sides. This kind of opposing overlap only amplifies losses.

Q: When running multiple EAs on a VPS, is memory and CPU usage a concern?

MT5 uses roughly 200–500 MB of memory per instance. For running 3–5 EAs simultaneously, a VPS with at least 1 GB of RAM is recommended. Check the VPS guide on this site for more details.

Q: Is there a way to pause all EAs at once?

You can stop each EA individually using the "⏸ Pause" button on its chart GUI (control panel). To stop all EAs together, turn off the Algo Trading button (in the top toolbar of MT5) — this halts new orders from all EAs simultaneously.

Q: When on a losing streak, which EA should I stop?

As a rule, avoid making emotional, ad-hoc decisions to stop a specific EA. Instead, decide in advance on a rule such as "temporarily pause and review any EA whose drawdown exceeds 15% of account balance," and follow that rule consistently.

Q: How do I review each EA's P&L in the MT5 report?

Go to the MT5 terminal and open the "Account History" tab to see a full trade log. The Comment column displays the EA name or MagicNumber, so you can filter by EA to isolate each one's P&L. You can also export the data as an HTML report using MT5's "Report" feature.

Q: How many EAs should a beginner start with?

It is strongly recommended to start with one EA, build at least 3–6 months of live forward-testing experience, and only then add a second. Rather than rushing to run multiple EAs, the top priority is to deeply understand and grow comfortable operating a single EA first.

Q: What should I do if a margin shortage occurs while multiple EAs are running?

If a margin call occurs, first restore the maintenance level by depositing additional funds or manually closing some positions. Then consider reducing the RiskPercent on each EA, or decreasing the number of active EAs. The root cause is almost always that the lot size is too large relative to available margin, so review your settings carefully.


5-Day Email Course (Free)

Get one email a day covering the essentials of FX automated trading, how to read backtests correctly, and tips for choosing a broker.

* Privacy strictly protected. You can unsubscribe at any time.

Comments & questions