[r]MT5 ROBOT LABCONFIGURABLE STRATEGIES

How to Run Multiple EAs on One MT5 Account: Magic Numbers, Conflicts and Portfolio Risk

INTERMEDIATE / GUIDE 13

Learn how to run multiple Expert Advisors on one MT5 account, assign magic numbers, prevent conflicts and control combined portfolio risk.

Yes, you can run multiple EAs on the same MT5 account by attaching each instance to its own chart. But separate charts and unique magic numbers do not automatically isolate positions, allocate capital or limit account-wide risk. Before combining robots, establish your account’s hedging or netting mode, check how each EA selects positions and define what happens when several strategies trade together.

This guide assumes you can already install an EA, load its inputs and run a baseline backtest. The next task is to make several programs coexist predictably. All strategies, magic numbers and dollar figures below are educational examples, not product defaults or recommended live settings.

Three separately labelled EA charts connect to one account with shared equity, margin and risk limits.
Different charts and magic numbers do not create separate capital pools.

Can MT5 run more than one Expert Advisor?

MT5 allows one EA per chart. Attaching another EA to that same chart replaces the existing one. To run three instances, open three charts and attach one instance to each. Two charts may show the same instrument and timeframe; their settings still need to identify which instance is responsible for which activity.

A multi-symbol EA is different: one program attached to one chart may trade several instruments internally. Its chart count therefore does not tell you how many positions or risks it can create. Record the full trading scope of every robot, not just the symbol visible behind it.

A terminal uses its currently connected trading account. Separate terminal installations can help organize deployments, but logging two terminals into the same account does not split the account’s positions, equity or margin. The broker sees requests from both.

Start with hedging versus netting

Your broker account’s position accounting system determines what happens when robots trade the same symbol. Ask the broker or consult the account specifications if the mode is unclear. Confirm it on the intended demo account; do not assume every MT5 account behaves identically.

QuestionHedging accountNetting account
Positions on one symbolSeveral separate positions can exist, including opposite directions.One aggregate position per symbol.
A new same-direction dealCan open a separate position.Increases the common position.
An opposite dealCan create an opposite position; explicit closure is a separate operation.Reduces, closes or reverses the common position according to volume.
Independent robots on the same symbolPossible if position management is correctly scoped and compatible.Requires deliberate coordination or virtual strategy accounting; labels alone are insufficient.
A buy of 0.10 lot followed by a sell of 0.06 lot creates two positions under hedging and one buy of 0.04 lot under netting.
A netting account combines same-symbol activity even when the deals have different magic numbers.

In the illustrated netting example, EA A buys 0.10 lot and EA B later sells 0.06 lot. The remaining position is a buy of 0.04 lot. EA B has changed the exposure EA A may still think it owns. If either program modifies the shared position’s Stop Loss or Take Profit, that change affects the shared position rather than a separate strategy slice.

For an intermediate user combining independent third-party robots, a straightforward research arrangement is one strategy per symbol on a netting account, or separate accounts where independent same-symbol management is needed. A coordinated multi-strategy EA can handle netting, but that capability must be explicitly designed and tested. Hedging makes separate position tickets possible; it still does not prove that every robot uses them correctly.

What is a magic number in MT5?

A magic number is a numeric identifier an EA can assign to its trading requests. Programs can use it when deciding which orders, deals or positions to inspect. It is a label, not a broker-enforced ownership lock. An EA that ignores the label can still manage other activity on the account.

Many robots expose an input such as MagicNumber, Magic or ExpertID. The name depends on the developer. Some use several identifiers or assign them internally. Follow the actual documentation and use values supported by that EA.

Use a distinct identifier for each independently managed instance on the same account. For example, the same robot running EURUSD M15 and EURUSD H1 can use different identifiers if those instances should manage separate trades. Keep a written registry so loading an old SET file does not silently reintroduce a duplicate.

InstanceTrading scopeExample magicRecord alongside it
A / BreakoutEURUSD / M1513001EA version, preset, exits and instance risk budget
B / PullbackEURUSD / H113002Whether its management can affect instance A
C / Mean reversionXAUUSD / M3013003Maximum concurrent positions and basket behaviour

The two EURUSD instances in this registry are a hedging-account interaction example, not an assertion that these unspecified robots are compatible. On netting, use them together only if coordinated management is documented.

Do not change a magic number casually while positions remain open. A robot may stop recognizing the positions it opened under the old identifier. Before an identifier change, establish how open positions and pending orders will be managed, including after a restart.

How to configure several EAs without unintended interference

  1. Confirm compatibility. Record account mode, broker symbol names, product versions, trading instruments, required timeframe and licensing restrictions. Check whether the robot is single-symbol or multi-symbol.
  2. Create separate charts. Attach one intended EA instance to each. Label the charts or save a profile so you can reconstruct the layout.
  3. Load and audit each preset. Review the magic number, lot method, maximum positions, trading hours, basket settings and exits after loading. A SET file is not evidence of suitability for your account.
  4. Check the management scope. Look for settings such as “all positions,” “current symbol,” “own magic only,” “close all” or “equity protection.” These phrases are examples, not standardized MT5 input names. Obtain clarification when the documentation is ambiguous.
  5. Choose account-wide limits. Define aggregate exposure, allowed simultaneous positions, treatment of pending orders and what blocks new entries. Write down which program or person has final authority.
  6. Run a controlled demo interaction test. Check entries, partial closes, trailing stops, basket exits and restarts with more than one instance active.

The important question is not whether both EA names appear on the screen. It is whether each program manages only its intended activity and whether their combined behaviour remains inside your chosen account constraints.

Three common conflicts a magic number will not solve

1. An account-wide close command

A robot with a broad equity target or emergency-close routine may close positions belonging to every strategy. That may be intentional for a portfolio controller and unexpected for an individual EA. Decide the intended scope before deploying it.

2. An exit routine that selects by symbol only

On a hedging account, a routine that acts on a symbol without identifying the intended position can target another robot’s position. Ask whether the EA checks its identifiers and uses the correct tickets. On netting, even correctly labelled deals feed the shared symbol position, so the coordination problem remains.

3. Duplicate execution after migration

If the same live setup runs at home and on a Windows VPS, both instances may send entry requests. An identical magic number does not universally prevent duplicate entries: prevention depends on the program. Make one execution location authoritative and verify the previous instance is inactive when migrating. Keep remote access for monitoring separate from launching a second execution copy.

Calculate combined risk before adding another robot

For a simple entry-to-stop estimate, express every planned loss in the account currency. Then add the losses of positions that may be open together. This gives a scenario budget, not a guarantee of the worst possible account outcome.

Illustrative arithmetic: account equity is $10,000. Three robots each open one position with $50 of planned initial loss at the stop. Each position uses 0.5% of that equity; together they represent $150, or 1.5%, before costs, gaps and slippage.

Three EAs each risk $50 on $10,000 equity, giving $150 or 1.5 percent planned initial stop-based loss before costs and execution effects.
Three positions at 0.5% each create 1.5% planned initial risk, not 0.5%.

If a robot can open four positions, “0.5% risk” may mean 0.5% per position rather than for the entire robot. Read the implementation or documentation. Also establish whether the percentage uses balance or equity, whether existing exposure reduces new size and whether the input includes transaction costs.

A nominal example allocation could be $50 for A, $30 for B and $20 for C, totaling $100 of planned initial loss on the same $10,000 account. Those figures demonstrate allocation only. They are not suitable limits for every strategy, trader or instrument.

To translate a stop distance into volume, use the broker’s actual contract specifications and account-currency calculation. Forex, gold and index CFDs can have different lot sizes and tick values. MT5 developers can estimate an operation’s profit or loss with OrderCalcProfit; a user should verify the EA’s sizing against the symbol specification and a controlled demo example. Do not reuse a dollar-per-pip assumption across instruments.

Without a defined exit and bounded position policy, the simple stop-based sum is unavailable. Grid, recovery, averaging and martingale systems can add exposure as prices move. An initial trade’s lot size does not summarize the basket’s possible loss. Investigate maximum volume, further entries, margin use and stressed paths separately.

More robots do not automatically mean diversification

Different names, timeframes or magic numbers can conceal the same exposure. A EURUSD breakout robot and a EURUSD trend robot may both buy into the same movement. They can also lose together when that movement reverses.

Compare when strategies enter, how long they hold positions and when their losses overlap. A useful starting point is a common daily equity timeline, including floating profit and loss, with deposits and withdrawals accounted for. A table of closed-trade profits alone may hide simultaneous floating losses.

For an educational illustration, suppose two strategies have worst drawdowns of 8% and 6% when assessed separately. Their combined drawdown is not automatically 14%, nor automatically 8%. It depends on timing, capital allocation, sizing and interactions on the shared account. Reconstruct the portfolio path instead of adding summary percentages.

Historical correlation is descriptive, not a guarantee. Test adverse joint scenarios even when the historical relationship looks favourable: several stop-outs on the same day, spreads widening together or a market shock affecting different instruments at once. Correlation work and stress tests supplement a hard exposure policy; they do not replace it.

Margin and loss limits need their own controls

A position’s planned stop loss and its required margin answer different questions. Enough margin to open an order does not make its possible loss acceptable. Conversely, a small stop-based budget does not ensure enough free margin to execute several requests together.

Review equity, used margin, free margin, broker stop-out conditions and hedged-margin rules. Do not assume opposite positions consume no margin. A developer’s OrderCalcMargin estimate calculates the requested operation without taking existing positions and pending orders into account; it is not by itself a complete shared-account risk check.

Define any account-wide loss threshold precisely: balance or equity, inclusion of floating losses, reference time and timezone, deposits and withdrawals, reset time, and whether reaching the limit blocks entries, cancels pending orders, closes positions or some combination. A percentage displayed in one EA does not prove the other EAs obey it.

Two robots may both inspect available capacity and then submit orders before either sees the other’s new exposure. Reliable aggregate entry limits require coordination or conservative instance limits that remain acceptable when entries coincide. A manager that notices excessive exposure only after execution cannot promise to prevent it.

Stopping new entries is different from disabling all automated trading. Turning the terminal’s Algo Trading control off also blocks EA trading requests used for exits and stop modifications; it does not close existing positions. Broker-side SL/TP can remain active, but virtual exits depend on the program. Build a documented stop-and-manage procedure rather than relying on a single switch.

How to test a multi-EA setup

Begin with reproducible individual tests using recorded versions, presets, dates, data and costs. Then evaluate combined behaviour. The normal MT5 Strategy Tester workflow selects one EA; a multi-symbol EA is still one tested program. Do not assume attaching several robots to your live workspace makes one test run reproduce their shared-account interaction.

For independent EAs, an external portfolio reconstruction can align individual histories and explore combined equity. State what it omits: shared margin, competing requests, changing lot sizes, pending orders or interference may not be reproduced. A coordinated portfolio EA or purpose-built simulator can model more of that behaviour if correctly implemented. A combined demo run provides another useful check, but its short sample and execution conditions still limit what it proves.

Four numbered stages identify account mode, isolate EA instances, test robots together and monitor account-wide controls.
A collection of individually tested robots still needs a combined interaction test.
Demo testWhat to observeReason to pause deployment
Two robots trade the same symbolWhich position each changes; whether direction and volume remain intendedAn unexplained close, reversal or SL/TP change
Signals occur close togetherTotal volume, planned loss and remaining margin after executionCombined entries exceed the stated budget
Restart with positions already openRecognition of old positions and pending orders; exit management resumesDuplicate entries or abandoned management
One EA reaches its exit or basket targetWhether other instances’ positions remain as intendedA local target closes unrelated activity
Account-wide threshold is reachedEntry blocking, pending-order treatment and open-position managementOther EAs continue adding unbudgeted exposure

Use demo conditions for deliberate interruption or conflict tests. Do not create a live loss merely to test a threshold. For filters that make a signal rare, use a controlled test harness or documented diagnostic mode where available, then restore the intended settings.

One account or separate accounts?

One account centralizes reporting and can simplify operation. It also shares the consequences of margin pressure, program mistakes and concurrent losses. Separate accounts can make strategy attribution and same-symbol position management easier, subject to broker and licence restrictions. They add administration and do not remove common market exposure across your total capital.

A second terminal connected to the same account is an organizational choice, not financial isolation. A second account is a different broker ledger, but still belongs in your overall risk assessment. Choose the arrangement that you can explain, monitor and recover reliably.

Monitoring after deployment

Maintain an instance register containing account, terminal location, EA version, magic identifiers, preset filename, trading scope and management rules. Monitor account equity and margin alongside instance-level performance. Review the Experts and Journal logs around unexpected orders rather than judging only the final balance.

Recheck after an EA update, preset change, broker migration or account-mode change. Measure terminal CPU, RAM and responsiveness with the actual combined workload. Resource capacity and hosting availability matter, but neither corrects a position-management conflict. See our home computer versus VPS guide for the operating environment.

Frequently asked questions

Can I run two EAs on the same currency pair?

Yes, but compatibility depends on account mode and management logic. Hedging allows separate positions; the robots must still select the correct activity. Netting combines same-symbol deals into a shared position, requiring coordination for independent strategies.

Can two robots use the same magic number?

They can, but independently managed instances may then mistake each other’s activity for their own. Use distinct identifiers unless the developer explicitly intends a shared strategy group. Verify the actual filtering behaviour.

Does a different timeframe prevent interference?

No. Charts and timeframes affect program context; they do not create separate positions or reserve account capital. Position selection and account-wide management rules determine whether interference occurs.

How many robots can one MT5 account run?

There is no useful universal answer based on robot count alone. Capacity depends on each program’s workload, terminal resources, broker restrictions, licensing and the account’s exposure and margin. Adding another chart is easier than validating another source of risk.

Will a trade manager work alongside my EAs?

Possibly, if its scope and authority are deliberately configured. Avoid competing trailing stops or basket exits. Test which program controls each position and what happens when their rules disagree.

Do unique magic numbers make several robots safe?

No. They help compatible programs identify activity. They do not guarantee correct position selection, prevent duplicate execution, reserve margin or limit combined losses.

Related Strategy Lab guides

Sources and editorial notes

Prepared by the MT5 Robot Lab editorial team. Reviewed 6 October 2026. Platform behaviour is grounded in the primary documentation below. The registry, arithmetic and deployment procedures are original educational examples. Broker rules and EA implementations must be checked for the actual setup.

MT5 Robot Lab provides configurable strategy tools. Combining them does not promise diversification, profitability or a maximum loss. Validate your own configuration and read the risk disclosure.

Withdraw from contract here · Paid adaptation purchase terms