All guides · Trading bots
Running a Trading Bot on a VPS
Why a trading bot needs MetaTrader running 24/5, and how a VPS keeps it online when your computer is off.
What it is
A VPS (virtual private server) is a computer in a data centre that stays on around the clock. Running MetaTrader there keeps your bot trading when your own computer is asleep, off, or offline.
Step by step
- Easiest: MetaTrader's built-in virtual hosting. In the Navigator, right-click your trading account and choose Register a Virtual Server, then follow the steps to rent one and move your charts and bots to it.
- Alternative: rent a Windows VPS from a hosting company or your broker (some brokers offer one free to active clients), install MetaTrader on it, and install your bot as usual.
- Pick a server location close to your broker's servers.
- Check the bot is running on the VPS (in its journal) before relying on it.
Why it matters
An EA only works while MetaTrader is open and connected. If your laptop sleeps, the bot stops: it can miss entries, and it can't manage trades that are already open.
Good to know
Bots that trade from daily candles, like the ones PositionAlpha builds, don't need ultra-low latency, so a basic VPS is enough. What matters is that it's always on.
Common mistakes
Running the same bot on both your computer and the VPS (it trades twice); forgetting to renew the VPS; and never checking the VPS logs.