01
Why a VPS for MetaTrader
An Expert Advisor (EA), MetaTrader's robot, only works while the terminal is open and connected to the broker's server. On a personal computer, it stops as soon as the machine goes to sleep, restarts for an update or loses its connection. On a VPS, the terminal runs in a data centre:
- Closing the Remote Desktop window does not close the session: the terminal, its charts and its EAs keep running. Sign out in the Start menu, however, closes the session and the terminal with it.
- You reach it from anywhere, from a PC, a Mac or a phone, with a Remote Desktop app: see connecting to a Windows VPS.
MetaQuotes' documentation lists Windows 10 and 11 as supported systems. The terminal also installs on Windows Server: still, run your first tests with a demo account before connecting a live one. Secure access to the VPS first, since it will give control over your trading account: see securing a Windows VPS.
02
Download and install the terminal
Download the installer from the VPS browser, on the official website metatrader5.com or on your broker's website, whose version may already include its list of servers. The installer is called mt5setup.exe: it is a web installer, which downloads most of the terminal during installation.
- Run
mt5setup.exe and accept the licence agreement.
- The Settings button lets you choose the installation folder and the Start menu group name.
- When the download finishes, click Finish and start the terminal.
- Several accounts at once: MetaQuotes says to install one terminal per folder. Two copies cannot run from the same folder.
- Portable mode: started with the
/portable switch (for example terminal64.exe /portable), the terminal keeps its data in its installation folder, which makes copies simpler. The account then needs write access to that folder.
- A file on your computer (an EA, an indicator): the guide transferring files over Remote Desktop gives the methods.
03
Log in to the account and start an Expert Advisor
The menu names given here are those of the English interface, described in MetaQuotes' help; they are translated if the terminal runs in another language.
Logging in. In the File menu, choose Login to Trade Account. Enter the account number, password and server as your broker provides them. Tick Save password: the next time it starts, the terminal reconnects to the last account used on its own. Use the master password: the "investor" password lets you view the account, not place orders.
The Expert Advisor.
- Open the data folder (File › Open Data Folder) and copy the EA file (
.ex5) into the MQL5\Experts subfolder.
- In the Navigator window, double-click the EA or drag it onto a chart. In its properties, at the bottom of the Common tab, tick the automated trading permission (Allow Algo Trading, or Allow Auto Trading depending on the version), then confirm.
- Turn on the Algo Trading toolbar button (AutoTrading in older versions). When it is off, no EA can trade, even if allowed one by one.
The EA's name and icon then appear in the top right corner of the chart; if the icon shows automated trading disabled, the EA is not allowed to trade. In Tools › Options (Ctrl+O), Expert Advisors tab, only allow DLL imports for trusted programs, as MetaQuotes advises. The current profile saves your charts, along with the EAs attached to them.
04
Restart MetaTrader after a reboot
After Windows restarts, the terminal only comes back if a session opens and starts it again.
- The Startup folder: right-click Start, choose Run, type
shell:startup and put a shortcut to the terminal there. Windows starts these programs when the user signs in.
- Automatic sign-in: without it, you have to reconnect over Remote Desktop after every restart. Microsoft's Autologon tool (Sysinternals) signs the session in at startup. Microsoft warns that the password, encrypted in the registry, can be retrieved by an administrator of the machine: one more reason to keep Remote Desktop to your own addresses.
To check at a glance, this PowerShell command lists the running MetaTrader 5 terminals, with their start time:
Get-Process terminal64 -ErrorAction SilentlyContinue | Select-Object Name, StartTime
Windows updates. They matter for security, but a restart stops the terminal for a few minutes. According to Microsoft, Windows Server does not install updates automatically by default: keep a mode where you decide when, such as "download only", install them while the markets you follow are closed, then check that the terminal is back. The guide Windows Server updates details the settings.
05
Latency to the broker
Two distances matter, and they do not have the same effect:
- From you to the VPS: it affects how responsive the Remote Desktop display feels, not your orders, which leave from the VPS.
- From the VPS to the broker's server: this is the time an order takes to travel. It depends on where the broker's servers are. From a VPS in France, the path is short to Western Europe and stays long to North America or Asia, whoever the host is.
Ask your broker where its servers are, then compare the response time shown by the connection indicator at the bottom right of the terminal, from the VPS and from home. A strategy that comes down to the millisecond calls for a machine in the same data centre as the broker: a VPS in France is not built for that.
Trading carries a high risk of losing capital. This guide gives no advice on investments, brokers or strategies, and a VPS changes nothing about a robot's results.
06
On CloudFive
CloudFive's Windows VPS, from €8.50 per month, comes with Windows Server installed, licence included, and Remote Desktop ready. The trading VPS page shows which tier to choose for the number of terminals.
- Ryzen 9 9950X, DDR5 memory, NVMe storage and a dedicated IPv4 address, in France, with basic anti-DDoS protection included;
- the customer area console, which shows the VPS screen even when Remote Desktop stops responding, and snapshots, to take once the terminal is set up;
- plan changes from the VPS page, with the difference charged pro rata, if you add terminals.
Monthly with no commitment, with support in French 7 days a week. A snapshot is not a backup: also keep a copy of the data folder off the VPS (see backing up a Windows VPS).
07
Frequently asked questions
How do I install MetaTrader 5 on a Windows VPS?
Connect to the VPS over Remote Desktop, download mt5setup.exe from metatrader5.com or your broker's website, run it and accept the licence. Then log in to your trading account from the File menu (Login to Trade Account), with the account number, password and server.
Does my Expert Advisor keep running if I close Remote Desktop?
Yes, if you simply close the window: the session stays open on the VPS with the terminal and its EAs. Choosing Sign out in the Start menu closes the session and stops the terminal.
How do I restart MetaTrader automatically after a Windows reboot?
Put a shortcut to the terminal in the Startup folder (shell:startup): Windows starts it when the session opens. For the session to open without you, Microsoft's Autologon tool sets up automatic sign-in, with a password stored on the machine.
Why is my Expert Advisor not placing orders?
Check that the Algo Trading toolbar button is on, that automated trading is allowed in the EA's properties and that you logged in with the master password, not the investor password. The icon in the top right corner of the chart shows whether the EA is allowed to trade.
Does a VPS in France reduce latency to my broker?
It depends on where the broker's servers are: the path is short to Western Europe, long to North America or Asia. Compare the response time shown by the terminal's connection indicator from the VPS and from home.