Do you need a VPS to run a MetaTrader 5 Expert Advisor?
An Expert Advisor only works while MetaTrader 5 is open, connected to the internet and logged in to your account. If your computer sleeps, restarts or loses its connection, the EA stops. A VPS solves that.
What a trading VPS is
A VPS (virtual private server) is a remote Windows computer that stays on all day, every day. You install MetaTrader 5 on it, attach your EA, and leave it running. You can close your own laptop without affecting the EA.
When you do and do not need one
If the EA trades around the clock or you cannot keep a computer on with a stable connection, a VPS is worth considering. If you only test on a demo account for a few hours, your own computer is enough.
What to look for
Trading does not need a powerful machine, but it needs a reliable one.
- Windows Server with at least 2 GB of RAM for one or two charts, more if you run several terminals.
- Low latency to your broker's server. Some brokers recommend or partner with specific providers.
- A provider with strong uptime and the ability to restart the machine remotely.
- Enough disk space for MetaTrader logs and history.
The built-in MetaTrader VPS
MetaTrader 5 offers a Virtual Hosting service through the MQL5 community. It copies your chart, EA and settings to a hosted terminal with one click. It is convenient, but check that it supports your EA: EAs that use a DLL cannot run on it, because the hosted environment does not allow external DLL files.
Moving your EA onto a VPS
Connect to the VPS with Remote Desktop, install MetaTrader 5 and log in to your broker account. Download your EA files from your account, then follow the same steps as a normal installation: copy the .ex5 file into MQL5\Experts, load the setfile and enable Algo Trading. Check the chart once a day for the smiling face that shows the EA is running.
Frequently asked questions
Can I run an EA on my home computer instead?
Yes, as long as MetaTrader 5 stays open, logged in and connected. Sleep mode, updates or a lost connection will stop the EA.
Does an EA with a DLL work on the MetaTrader VPS?
No. The MetaTrader Virtual Hosting service does not allow DLL files, so use your own Windows VPS for EAs that need a DLL.
How do I know the EA is running on the VPS?
Look for a smiling face in the top-right corner of the chart and check the Experts tab in the Toolbox for log messages.
Trading foreign exchange, gold and CFDs carries a high level of risk and may not be suitable for all investors. Past performance, backtests and live results do not guarantee future returns. This guide is general education, not financial advice.