MT5 expert advisor VPS setup basics: what must stay running and what to check after the move

8 min read

What has to keep running for an MT5 expert advisor to trade, and the basic checks for connection, Algo Trading, inputs and restarts when you move your terminal to a VPS.

MT5 expert advisor VPS setup basics: what must stay running and what to check after the move

What an EA needs to keep running

An MT5 expert advisor only trades while five things are alive at the same time: the machine, the MetaTrader 5 terminal process, a logged-in broker connection, the chart the EA is attached to, and algorithmic trading permission. A VPS keeps the first of these available around the clock. The other four are still your job to configure and verify after you move the terminal. This guide lists each piece in order, then gives the checks to run after migration and after every restart.

This is not an installation guide. If you still need to copy the EX5 file and attach it to a chart, start with the MT5 expert advisor installation guide and come back here once the EA loads correctly on your home PC.

Automate this on MetaTrader 5

A MetaTrader 5 expert advisor with documented inputs, full backtest settings and clear risk limits.

Instant deliverySecure payment97% satisfactionLifetime access

The uptime chain: five links that all must hold

Think of EA uptime as a chain. If any link breaks, the EA stops without much warning, and nothing on the VPS dashboard will tell you.

  1. The machine. The VPS must be powered on, and the Windows session that runs the terminal must stay open.
  2. The MT5 terminal. It has to be running inside that session, not just installed.
  3. The VPS connection to the broker. The account must be logged in with the master (trading) password. An investor password connects but cannot place orders.
  4. The chart with the EA. The EA lives on a specific chart, for example EURUSD M15. If that chart closes, the EA closes with it.
  5. Algo Trading permission. The global Algo Trading button in the toolbar must be on, and the EA's own Common tab must allow algorithmic trading.

Most "my EA stopped on the VPS" problems come down to one of these five. Usually it is link 1 or 2 after an unplanned restart.

Two ways to put an MT5 terminal on a VPS

There are two common setups, and the checks differ slightly between them.

Option 1: a Windows VPS you control

You rent a Windows server, connect with Remote Desktop, install MT5, log in to your broker account and attach the EA exactly as you would at home. You get full control over the Windows session, updates and power settings. You also take on all of that responsibility yourself.

Option 2: the built-in MetaTrader virtual hosting

MT5 includes a virtual hosting service that runs a copy of your terminal environment on a remote server. You subscribe from inside the terminal, then migrate your charts, attached EAs and their inputs from your local terminal. The MetaTrader 5 virtual hosting documentation describes the registration and migration steps. Check it for current menu names, because they can change between builds.

The main difference is visibility. On the built-in hosting you do not get a desktop. You keep your local terminal as a control panel and read the remote logs from it. Whenever you change something locally, you must migrate again so the remote copy picks it up.

Before you move: prepare the local terminal

A clean migration starts with a clean local setup. On your home PC:

  • Confirm the EA runs without errors. Watch the Experts and Journal tabs for a full session. If you see red lines, fix them first. The guide to MT5 expert advisor log errors explains what each tab records.
  • Close every chart you do not need. On a VPS, each open chart uses memory and CPU, and on the built-in hosting only what is open gets migrated.
  • Save your inputs as a set file so you can reload exactly the same parameters if something resets.
  • Write down any extra permissions the EA requires. Some EAs need DLL imports allowed, or specific URLs added to the WebRequest list in Tools >> Options >> Expert Advisors. If the vendor documentation mentions these, they must be set on the VPS too.
  • Note the exact symbol name. Brokers name instruments differently, such as EURUSD, EURUSD.r or EURUSDm, and index CFDs tracking ES or NQ often carry broker-specific names. The EA must sit on the symbol your account actually trades.

If you are evaluating a ready-made robot, an MT5 expert advisor with documented inputs and set files makes this step faster, because the permissions and parameters are already written down.

After the move: the basic checks

Run these checks right after migration. Repeat them after any VPS reboot.

1. VPS connection to the broker

In a self-managed VPS, look at the connection indicator in the bottom right corner of the MT5 terminal. A working connection shows traffic figures and a ping value. "No connection" or "Invalid account" means link 3 is broken. Check the server name in File >> Login to Trade Account and re-enter the master password if needed.

Ping matters more for some EAs than others. A swing EA on EURUSD H4 barely notices 80 ms. A scalping EA reacting to tick-level moves on an index CFD may behave differently from your backtest at that latency. Choose a VPS location close to your broker's trade server, and compare the ping values before and after the move.

2. MT5 terminal and Algo Trading status

Confirm the Algo Trading button is active in the toolbar. Then open the Expert Advisors tab under Tools >> Options and confirm algorithmic trading is allowed. The MetaTrader 5 algorithmic trading help page explains both switches and the per-EA permission.

On the built-in hosting, the remote environment uses the settings migrated from your local terminal. That is why the local switches must be correct before you migrate.

3. The EA is attached and initialized

On each chart, the EA name should appear in the top right corner with an active icon. In the Experts tab, look for the initialization message the EA prints on load, if it prints one. On the built-in hosting, open the hosting journal from your local terminal and look for confirmation that the charts and EAs were migrated, with no load errors.

4. Inputs match what you intended

Open the EA properties (F7 on the chart) and compare the inputs with your saved set file. Pay particular attention to lot size, risk percentage and magic number. A wrong magic number can make the EA ignore its own open positions. For a deeper look at those parameters, see MT5 expert advisor risk settings explained.

5. Run only one copy

Never run the same EA on the same account in two places at once. This is easy to do by accident when the local terminal and the VPS both have the EA attached and both have Algo Trading on. You can end up with duplicate orders or conflicting position management. After migrating to the built-in hosting, either turn off Algo Trading locally or remove the EA from the local chart. Then confirm in the hosting journal that only the remote copy is trading.

Keeping it running: restarts and sessions

This section mostly applies to a self-managed Windows VPS, where uptime depends on how Windows behaves.

  • Disconnect, do not log off. Closing the Remote Desktop window disconnects your session and leaves programs running. Choosing Sign out closes the session and the terminal with it.
  • Plan for Windows updates. Updates can reboot the server. Schedule active hours or a maintenance window outside the hours your EA trades. For a EURUSD EA, the quiet window around the daily rollover is often easier to work with than the London or New York session.
  • Auto-start the terminal. Put a shortcut to terminal64.exe in the Windows Startup folder so MT5 relaunches after a reboot. Check whether your VPS can log in to Windows automatically. Some providers allow it, others require a manual login before anything in Startup runs.
  • Rely on the saved profile. MT5 reopens the charts and EAs from the last profile when it starts normally. After any reboot, still run checks 1 to 3 above instead of assuming everything came back.
  • Watch resources. Check memory use in Task Manager after a full trading day. Limiting "Max bars in chart" in Tools >> Options >> Charts reduces memory per chart if you run several EAs.

If the EA is running but still not trading, the cause is usually conditions, permissions or broker limits rather than the VPS itself. The checklist in MT5 expert advisor not placing trades covers that case.

Conclusion

A VPS only solves the machine part of EA uptime. Keeping an MT5 expert advisor trading still depends on the terminal running, a logged-in master-password connection, the chart staying open, and Algo Trading switched on. Prepare the local terminal first, run the five checks after every migration or reboot, and make sure only one copy of the EA is live. A VPS does not change a strategy's results, so test any EA thoroughly before relying on it with real money. If you want a robot with its inputs, permissions and set files documented for this kind of setup, explore the MT5 expert advisor available from SierraOnShop.

FAQ

Do I need to keep my home PC on when the EA runs on a VPS?

No. Once the EA runs on the VPS, your home PC can be off. With the built-in hosting, you only need the local terminal to change settings, migrate again or read the hosting logs.

How much RAM does a VPS need for MT5?

It depends on the number of charts, EAs and bars loaded. A single terminal with a few charts usually needs modest resources. Check Task Manager after a full session and leave headroom rather than running close to the limit.

Can I run two MT5 terminals for different brokers on one VPS?

Yes, on a self-managed VPS you can install separate MT5 copies in different folders, one per broker. Each copy needs its own login, its own charts and its own Algo Trading check.

Will a VPS make my EA match the backtest?

Not necessarily. A VPS can reduce latency and downtime, but spreads, slippage and execution conditions still differ from the Strategy Tester, so live results can diverge from a backtest.

Run it in MetaTrader 5

Clement

Written by

Futures trader for more than seven years, specialized in order book and order flow scalping on US index futures, now building automated strategies. Founder of SierraOnShop.

More about the author

Ready to run an expert advisor?

A MetaTrader 5 expert advisor with documented inputs, full backtest settings and clear risk limits.

Instant deliverySecure payment97% satisfactionLifetime access