What a VPS is and why an EA needs one

By Otto Research 3 min read Article 20 of 95

A virtual private server, or VPS, is a share of a computer in a data centre that you rent by the month and control remotely as if it were your own. For trading, it runs Windows and MetaTrader 5, stays on twenty-four hours a day, and keeps your EA running whether or not your own computer is on, connected or awake.

Why it matters

An EA runs only while MetaTrader 5 is open and connected. A laptop that sleeps, a home connection that drops, a Windows update that restarts the machine at 3am, each one stops the EA. A position with a server-side stop is protected during the gap, but the EA will miss any signal that occurs, and an EA that manages trades itself, with virtual stops or trailing logic, is left with unmanaged positions. For anything more than a demo experiment, a VPS is a requirement, not a luxury.

Options and cost

Three kinds exist. General-purpose VPS providers rent Windows servers by the month, from a few pounds to a few tens of pounds depending on memory and location. Trading-specific VPS providers place their servers in the same data centres as major brokers, which reduces latency, and charge somewhat more. MetaQuotes' own service, MQL5 VPS, is rented from inside the MetaTrader 5 platform, migrates your charts and EAs with two clicks, and is the simplest option for one account at a modest price. Some brokers also offer a free or discounted VPS to clients above a deposit threshold.

For most EAs, particularly those trading on hourly or daily charts, the cheapest reliable option is adequate. Latency between the VPS and the broker only matters at the scale of milliseconds, and a strategy that cares about milliseconds has other problems.

Setting one up

Install MetaTrader 5 on the VPS, log into your broker account, copy the EA's .ex5 file into the Experts folder, attach it to the charts it needs, and enable Algo Trading. Then confirm three things. That MetaTrader 5 restarts automatically if the server reboots, usually by placing a shortcut in the Windows startup folder. That the EA's settings match what you intended, ideally by loading a saved .set file. And that the Experts tab shows the EA initialised without errors. Check the server occasionally, since a VPS is a computer and computers fail.

Worked example

A trader runs an EA from a home PC. On a Tuesday night the PC installs an update and restarts, and MetaTrader does not reopen. The EA's open gold position has a server-side stop and is unaffected. But at the four-hour bar open on Wednesday morning the EA would have taken a signal in EUR/USD that it never saw, and that trade, which was one of the better ones that month, never happened. On a £20 a month VPS it would have.

What this means when an EA is trading

How much an EA depends on the VPS depends on how it is built. An EA that sends every stop and target to the broker at entry and makes decisions once per bar is tolerant of short outages; it misses a signal at worst. An EA that holds its stops in memory, trails them tick by tick, or trades on very short timeframes needs continuous uptime and low latency, and any interruption can leave a position unprotected or a signal missed at the worst moment.

The vendor's documentation should say which kind it is. If it recommends a specific VPS location for latency reasons, the strategy is execution-sensitive, and that sensitivity is part of the risk. If it simply asks for reliable uptime, the design is more forgiving.

From theory to live

See it put to work.

The concepts on these pages are what Otto is built on. Watch it trade them live, on real accounts.