Switching Accounts in MT4 or MT5 Can Move Your EA to the Wrong Account

person
FXVPS
Share
Switching Accounts in MT4 or MT5 Can Move Your EA to the Wrong Account

You have a live account and a demo account with the same broker. The EA runs on the live one. One evening you want to check something on the demo, so you double-click it in the Navigator, have a look, and log out of the VPS. The next morning the live account has not traded, and the demo has a handful of new positions.

Nothing crashed. You switched accounts, and the EA went with the terminal. This is one of the most common mix-ups we see on trading VPSs, and it is easy to avoid once you know how MetaTrader handles accounts.

One Terminal, One Connected Account

An MT4 or MT5 terminal can remember many accounts. They are listed in the Navigator under Accounts, and you can log in to any of them with a double-click.

But a terminal is connected to only one account at a time. When you log in to a second account, the terminal disconnects from the first. The first account is not touched on the broker’s side, and its open positions stay open, but the terminal is no longer watching it.

📊 Key Stat: One running MT4 or MT5 terminal equals one connected trading account. Five accounts traded at once means five terminals running at once.

Your EAs Follow the Terminal, Not the Account

This is the part that catches people out. An EA is attached to a chart, and the chart belongs to the terminal. It is not tied to a particular account.

When you switch accounts:

  1. The terminal disconnects from account A and connects to account B.
  2. Your charts stay open.
  3. Your EAs restart on those charts, now connected to account B.
  4. If Algo Trading (MT5) or AutoTrading (MT4) is still on, they start trading account B.

Meanwhile, account A’s open trades sit unmanaged. Trailing stops stop moving, basket closes do not run, and any virtual stop loss held by the EA disappears. See what stops working when your MT4 terminal goes offline.

What happens to your EA when you switch accounts in one terminal

⚠️ Warning: If account B is live and the EA was set up for a small demo balance, or the other way round, its lot sizes may be completely wrong for the new account. Never switch accounts in a terminal that has EAs on its charts with Algo Trading on.

Other Ways This Happens Without You Noticing

  • Logging in from the Navigator to “just check” an account, as in the example above.
  • A new account added through File, Login to Trade Account, which connects to it immediately.
  • Opening a demo account from inside the terminal, which logs you in to the new demo straight away.
  • Saving the wrong account at startup. A terminal reconnects to the last account it was logged in to. If that was the demo, a VPS restart brings it back on the demo.

The last one is easy to miss. Everything can look right for weeks, and then a Windows update restarts the VPS and your terminal comes back on the wrong account. See why did my VPS restart? and the knowledge base guide to platforms starting after a restart.

The Fix: One Terminal per Account

The safe setup is simple. Give every account its own terminal installation, each in its own folder, each with its own desktop shortcut.

  1. Install the platform again into a new folder. During setup, choose Settings and change the installation folder, for example C:\MT5 Live and C:\MT5 Demo. See installing more MT4 platforms with the same broker.
  2. Name the shortcuts clearly, for example “MT5 LIVE 1234567” and “MT5 DEMO 7654321”, so you never open the wrong one.
  3. Log each terminal in to one account only, and do not log it in to anything else.
  4. Attach the EAs in the right terminal, load your set files and save a profile. See EA set files and presets.
  5. Make each terminal start after a restart, by placing a shortcut for each in the Startup folder.

Some traders also use portable mode, so each terminal keeps all its data inside its own installation folder. That makes it obvious which files belong to which account. See MT4 and MT5 portable mode on a VPS.

Steps to run one terminal per account on your VPS

💡 Tip: Put the account number in the shortcut name and use a different chart background colour in each terminal (for example a dark red tint on live). A glance tells you which one you are looking at.

How to Tell Which Account a Terminal Is On

  • Title bar. The terminal’s window title shows the account number and server.
  • Navigator, Accounts. The connected account is highlighted.
  • Trade tab. The balance and equity at the bottom belong to the connected account.
  • Journal tab. Each login is logged with the account number, so you can see when a terminal switched.

If an account has unexpectedly stopped trading, check the Journal of the terminal that should be running it. A line showing a login to a different account is the giveaway.

Checking an Account Without Disturbing the EA

If you want to look at another account without moving any EA, you have a few options:

✅ Best Practice: Treat the live terminal on your VPS as hands off. Do not log in to other accounts in it, do not open demo accounts from it, and do your checking on your phone or in a separate terminal.

What About Copy Trading and Prop Firm Accounts?

Trade copiers that run as EAs work the same way. The master and each follower need their own terminal, connected to their own account. If you log a follower terminal in to a different account, the copier will start copying into that account instead. See copier not showing MT4 accounts on a VPS and copy trading setup on a VPS.

Prop firm traders with several funded or challenge accounts need one terminal per account too. Before running several accounts from one VPS, check your firm’s own rules on copying and IP addresses. See multiple prop firm accounts on one VPS.

How Many Terminals Can My VPS Run?

Each terminal uses its own RAM and CPU, so the number of accounts you can run comes down to your plan and how heavy your EAs are. See how many MT4 terminals can I run on my VPS? and running multiple MT4 and MT5 terminals on a VPS.

  • Core ($29/mo, 2GB RAM, 1 vCPU): one or two terminals, such as a live account and a demo.
  • Pro ($39/mo, 4GB RAM, 2 vCPU): several terminals, one per account.
  • Scaling ($79/mo, 8GB RAM, 4 vCPU): many accounts, copiers, or CPU heavy EAs.

See the pricing page, or start with the $2.99 7-day trial.

Why FXVPS for Multi-Account Traders

  • Run a terminal per account on your own Windows desktop, all online 24/7.
  • Servers near your broker in London, New York, Tokyo, Hong Kong and over 15 locations.
  • Plans that grow with the number of terminals you run.

Frequently Asked Questions

Can one MT4 or MT5 terminal trade two accounts at once?

No. A terminal can store many accounts but is connected to only one at a time. To trade several accounts at once, run one terminal per account.

What happens to my open trades when I switch accounts?

They stay open on the broker’s server, but the terminal stops watching them. Anything the EA was managing, such as trailing stops or basket closes, stops until you reconnect that account.

Why did my EA start trading my demo account?

You, or the terminal, logged in to the demo. EAs are attached to charts, not accounts, so they carry on trading whatever account the terminal is connected to.

My terminal came back on the wrong account after a restart. Why?

A terminal reconnects to the last account it was logged in to. Log it back in to the right account and keep other accounts out of that terminal.

How do I look at another account without stopping my EA?

Use a separate terminal, the mobile app, or the investor password in a view only terminal. Do not switch accounts in the terminal running your EA.