MT5 guide

How to Run Multiple MT5 Expert Advisors on One Windows PC

To run multiple MT5 expert advisors on one Windows PC, attach one EA per chart in a single terminal. To run EAs on several accounts, install a separate MT5 copy for each account in its own folder. Give each EA a unique magic number. Keep the PC awake and connected, since an EA runs only while its terminal is open.

Trading forex and CFDs involves substantial risk of loss. Automation applies rules; it does not remove trading risk. Read our risk disclosure.

Key takeaways

Five ways to run multiple MT5 strategies on Windows

Before adding charts or extra terminal folders, compare the five common ways traders run multiple strategies on Windows. Each setup trades off account count, process isolation and keep-alive effort differently.

Comparison of five ways to run multiple MT5 strategies on Windows
SetupAccounts & strategiesProcess isolationKeep-alive requirementKey limit
Multiple charts in 1 MT5 terminal1 MT5 account; multiple EAs (one per chart)None; all charts share one terminal process and loginLocal Windows PC awake, terminal open, network activeAll EAs stop together if the terminal closes, restarts or switches accounts
Multiple /portable MT5 installationsMultiple MT5 accounts; multiple EAs per terminalSeparate process, installation folder and data folder per copyLocal Windows PC awake, every copy open, network activeCopies share PC CPU, RAM and network; requires non-Program Files folders or UAC permissions
Single multi-strategy EA (e.g. Composer V1)1 MT5 account; multiple built-in strategy modules inside one EASingle EA instance with module-level controls and magic numbersActive supported environment or open terminal with stable connectionAll enabled modules share the same account equity, margin and single host session
Windows Forex VPS (Forex VPS guide)1 or more MT5 terminals (separate folders for extra accounts)Remote Windows OS; per-folder terminal isolationRemote server stays online 24/7; verify auto-login after rebootsOngoing server cost and fixed VPS vCPU and RAM caps
YO4X Windows DesktopCurrent staged release: 1 active strategy per supported MT5 demo accountManaged desktop workspace for supported MT5 demo workflowLocal Windows PC awake, YO4X open, network activeDemo-only staged release; does not execute arbitrary uploaded EX5 files

Run multiple MT5 expert advisors in one terminal

A single MT5 terminal can run several EAs at the same time, one on each chart. Open a chart for each symbol or timeframe you need, then drag an EA from the Navigator onto that chart. An EA works from the chart it is attached to. To use the same EA on two charts, attach it to each chart separately.

  1. Open one chart per EA, and set the symbol and timeframe each EA needs.
  2. Drag each EA from the Navigator onto its chart, then set its inputs in the properties window.
  3. Check the Common tab of each EA’s properties for “Allow Algo Trading” (Allow Auto Trading in some versions).
  4. Turn on the Algo Trading button on the toolbar (AutoTrading in some versions).
  5. Open the Toolbox (View → Toolbox) and read the expert journal for load errors.

Menu names and toolbar icons can vary by MT5 build. Check the MetaTrader 5 help for your version.

Run a second MT5 copy for another account

One terminal is not enough when EAs must run on different accounts at the same time. The platform installation help says that if you need to work with several accounts simultaneously, you should install the platform into different directories. In the installer, choose Settings and set a separate Installation folder for each copy.

The platform start help also describes portable mode. By default, a copy installed under Program Files keeps its data in a Windows user directory. Adding the /portable key to the command line stores the copy’s data in its installation folder instead. If the copy is installed under Program Files, the user needs administrator rights, and UAC must be disabled. If it is installed in any other folder, the user needs permission to write data to that folder. A launch command for the second copy looks like this:

"D:\MT5 Account 2\terminal64.exe" /portable

The help uses terminal.exe and terminal64.exe in its examples. Use the file name you see in your own installation folder.

One Windows PC holds two terminal panels. Terminal A runs from folder A for account 1, and Terminal B runs from folder B for account 2. Each panel shows chart tiles running EAs tagged with magic numbers, and an optional VPS card marks where a machine can run 24/7.
Concept diagram, not an app screenshot.

Keep the copies apart. Each copy must run from its own folder, and the same folder cannot host two running copies. Give each copy its own chart list and EA set, and record the account each result came from.

Default %APPDATA% storage vs /portable and UAC permissions

Without /portable, an MT5 terminal writes its MQL5 experts, profiles and logs to a hashed subfolder inside the Windows user profile (%APPDATA%\MetaQuotes\Terminal). Using /portable keeps that copy’s data inside its own installation folder, which makes shortcut management and folder backups easier to track. Install extra /portable copies outside C:\Program Files (for example, in D:\MT5 Account 2\) so Windows User Account Control (UAC) does not block writes or require disabling system-wide UAC prompts.

Use magic numbers so EAs leave each other’s trades alone

A magic number is an ID that an EA attaches to the orders and positions it opens. The EA can then filter on that number and manage only its own trades. The MQL5 standard library’s CTrade class sets the value with SetExpertMagicNumber. Some EAs expose the number as an input, so check the input list before you attach them.

Same EA on two charts
Use a different magic number on each chart.
Two EAs on one account
Use a different magic number for each EA, and confirm both filter on it.
EA with a fixed number
Check the source or documentation. A hard-coded number cannot be changed from the inputs.

A magic number only helps when the code uses it. Two instances of the same EA on the same symbol with the same number can each see and change the other’s positions. Record the number you used for each EA in your trading journal, so that a later review can match each trade to its EA.

Hedging vs netting conflicts and shared account risk

Why netting accounts merge positions despite distinct magic numbers

MetaTrader 5 accounts use either netting or hedging position accounting. On a netting account, only one open position can exist per symbol at a time: a second buy averages into the existing volume, and a sell from another EA reduces, closes or reverses that single position even when both EAs use different magic numbers. To keep separate positions and stops isolated on the same symbol, you need a hedging account plus distinct magic numbers that each EA actively filters on.

Shared margin, correlated exposure and live monitoring

Magic numbers separate order management, not account risk. Every EA on the same account shares one balance, one free-margin pool, the broker’s maximum open-order limit and the same Stop Out threshold. Running several Gold EAs or grid EAs together can compound correlated drawdown during a fast XAUUSD move even if each strategy looked controlled on its own. Review each strategy’s documented behaviour and hedging setup separately — for example, checking a single strategy’s rules in the Quantum Titan MT5 setup and risk guide — before combining EAs on a demo account.

Watch combined floating equity, used margin and margin level across all attached EAs in the terminal Toolbox (MT5 real-time P&L). You can also check open positions remotely in MT5 mobile, though the phone app is for monitoring and manual control — it does not run desktop Expert Advisors.

Check resources before you add another terminal

Each terminal uses CPU, memory and a connection to the broker’s server. Many charts and busy EAs in one copy can slow the terminal and delay price updates, and each extra copy adds to the same PC limits.

Resource checks for each terminal
ResourceWhy it mattersWhat to check
ChartsEach open chart keeps its own data and redraws on price changes.Close charts that no EA uses.
History depthDeep bar history uses memory and lengthens start-up.Review the bar limits in Tools → Options (Ctrl+O).
Market Watch symbolsEvery subscribed symbol receives quotes.Hide symbols that no EA or chart needs.
Tick-driven logicCode that runs on every tick uses more CPU, and copies add up.Watch CPU use in Windows Task Manager while the EAs run on demo, before you add more.
PC totalEvery copy shares the same CPU, memory and network.Watch Windows Task Manager while all EAs run together.

Limits and menu paths vary by build. Test the full set of EAs on a demo account before you rely on it.

Keep the PC awake and connected

An EA runs only while its terminal is open and connected to the broker’s server. If the PC sleeps, restarts or loses its network connection, every EA on that PC stops, in every copy.

  1. Open the Windows power settings and set the sleep timers so the PC does not sleep while EAs run.
  2. Schedule Windows updates and restarts outside trading hours, or pause them while EAs run.
  3. After a network drop, check that each terminal reconnects to the broker’s server.

Windows update reboots and recovery checks

An unattended Windows update reboot closes every open MT5 copy. Before leaving EAs unattended, check how each terminal recovers after a restart: verify whether your desktop session and each /portable shortcut need manual relaunch, confirm that the saved chart profile reloads with the right inputs, check the Algo Trading button state, and read the Experts and Journal tabs to confirm clean reconnection.

Windows menu paths vary by version and by the power plan set on the PC.

When a VPS helps

A VPS is a remote Windows server. It helps when EAs must run around the clock, or when the home PC or home connection cannot stay on. You can run several MT5 copies on one VPS in the same way, with a separate folder for each. A VPS does not change the rules above. It moves the awake-and-connected requirement to the server. Read how to compare forex VPS options and how to connect to a VPS before you choose one.

Where YO4X fits

YO4X is a Windows desktop workspace for supported MetaTrader 5 strategies, bot configuration and trading journals. It runs on 64-bit Windows 10 and Windows 11. The current desktop workflow is gated to supported MT5 demo accounts, and live-money trading is not released.

The staged release allows one active strategy per MT5 account. YO4X does not execute EX5 files or arbitrary uploaded code. MQ5 source can be submitted for restricted compatibility analysis.

Local operation needs the PC awake, YO4X open and the connection active. The journal sits in the same workspace as the bot settings, so you can keep demo results next to the settings that produced them, as the trading journal page describes. Get the app from the download page.

A backtest or a demo run is not proof of live results. Use only EAs you wrote, bought or licensed. Read how to verify a trading bot before you rely on any test result.

Frequently asked questions

Can one MT5 terminal run several expert advisors?

Yes. Each EA is attached to its own chart, and one terminal can have charts for several symbols and timeframes open at once. Give each EA its own chart, and check the expert journal in the Toolbox for errors from each one.

Can I open two MT5 terminals on one Windows PC?

Yes, provided each copy runs from its own installation folder. The platform help says two copies cannot run from the same directory, so install the second copy in a different folder. Use the /portable switch only if you want that copy’s data kept in its installation folder.

Do two EAs on the same account conflict?

They can. If two EAs trade the same symbol and one does not filter on its own magic number, it may modify or close trades opened by the other. Give each EA a unique magic number on a hedging account, and test the pair together on a demo account before you rely on it.

Why do two EAs on the same symbol conflict on a netting account even with different magic numbers?

A netting MT5 account holds only one aggregated position per symbol. Opposing orders reduce or reverse the existing position, and same-direction orders average into one net ticket regardless of magic number. To keep each EA’s positions and stops separated on the same symbol, use a hedging MT5 account with distinct magic numbers.

Can I run the same Expert Advisor on two charts of the same symbol?

Yes, on a hedging account, provided you attach the EA to two separate charts and assign a distinct magic number to each chart’s inputs. Confirm that the EA actually exposes and filters on its magic number, and monitor combined margin and equity in MT5 real-time P&L on a demo account first.

What CPU and RAM warning signs show I am running too many MT5 terminals?

Watch for sustained high CPU usage in Windows Task Manager, steadily rising memory use per copy, lagging chart redraws or UI freezes, delayed order timestamps in the Journal, and frequent server reconnects. Reduce load by hiding unused Market Watch symbols, closing charts without EAs, lowering max bars in chart, or moving excess terminals to a dedicated server.

Should I run separate EAs on multiple charts or use one multi-strategy EA?

Separate EAs let you mix independent strategies and split them across separate terminals or accounts, whereas a single multi-strategy EA such as Composer V1 places multiple strategy modules under one attachment with shared controls and per-module magic numbers. In either setup, strategies on the same account share balance, free margin and Stop Out risk.

Do I need a VPS to run several EAs?

No. A VPS is one way to keep EAs running when the PC cannot stay awake and connected. If your PC can stay on with a stable connection, a local setup may be enough. The choice depends on uptime needs, connection stability and the cost of keeping a machine running.

Keep reading

Sources: Platform Start - For Advanced Users - Getting Started - MetaTrader 5 Help · Platform Installation - For Advanced Users - Getting Started - MetaTrader 5 Help · Files and Folders - For Advanced Users - Getting Started - MetaTrader 5 Help · SetExpertMagicNumber(ulong) - CTrade - Trade Classes - Standard Library - MQL5 Reference

Trading forex and CFDs involves substantial risk of loss. Past performance and backtests do not guarantee future results. Read our risk disclosure before you trade.