How to Run an EA on a VPS So It Trades 24/5
EABuild Team · · 10 min read

An expert advisor only trades while MetaTrader is open, connected and logged in, so many traders choose to run an EA on a VPS instead of leaving a home computer switched on. This guide explains what a VPS is, compares MetaTrader's built-in hosting with a Windows VPS, and walks through the steps to move an EA across and check it.
Why an EA needs a computer that stays on
An EA is a program that lives inside your MetaTrader terminal. It reads prices, applies its rules and sends orders, but only while the terminal is running. If you close the terminal, put the laptop to sleep or lose your internet connection, the EA stops checking the market. Open trades stay on your broker's server, but nothing is managing them.
A VPS (virtual private server) is a computer you rent that runs in a data centre and stays powered on. You install MetaTrader on it exactly as you would on your own PC, attach your EA and leave the terminal running. Your home machine can then be switched off.
The title says 24/5 because the forex and CFD markets generally close over the weekend. The VPS itself runs all week, but your broker's trading hours decide when orders can actually be placed. Your broker's website lists the exact hours for each symbol.
What a VPS does and does not do
- It keeps the terminal running through power cuts, home internet drops and computer restarts at your end.
- It can sit closer to your broker's server than your home does, which can shorten the delay between the EA sending an order and the broker receiving it.
- It does not change what the EA does. The same settings produce the same behaviour, and the same trading risk applies.
- It does not make a strategy better. A poorly chosen set of inputs will lose money on a VPS just as it would at home.
Latency and why it matters for some EAs
Latency is the time a message takes to travel between your terminal and the broker's server, measured in milliseconds. MetaTrader shows the current figure in the bottom-right corner of the terminal, next to the connection bars. A lower number means orders arrive sooner.
Latency matters more for some strategies than others. Scalping means many short trades that aim at small price moves, so spread and execution speed matter. A delay of a fraction of a second can change the fill price. Slower styles that hold trades for hours care much less.
HFT Prop Firm EA for MT4 is listed as a scalping EA for US30 and GER30 on M1 and M5. Because it is a scalping EA, the ping figure between your VPS and the broker is worth checking. Index symbol names differ by broker, so confirm the exact name on the VPS terminal.
If you can, pick a VPS location near the data centre your broker uses, and ask the broker where its trade servers are. Compare the ping figure on the VPS with the figure on your home connection before you commit to a plan.
MetaTrader built-in hosting or a Windows VPS
There are two common routes. Both keep your EA running, but they work differently, and the right one depends on how much control you want.
MetaTrader's built-in Virtual Hosting
MetaTrader has its own hosting service, called Virtual Hosting, which you rent through the MQL5 community. You do not log in to a remote desktop. Instead, you right-click your account in the Navigator panel of the terminal and register a virtual server, and the platform copies your account connection, charts, EAs and indicators to a server run by MetaQuotes, the company behind MetaTrader.
The advantages are simplicity and the fact that the server is built to run MetaTrader. The limits are that you manage it only through the terminal, and you cannot install other software next to it. Check the current requirements on the MetaTrader site before you rely on it, and note that an EA which needs a DLL (an external Windows library file) is a particular case to check, because the hosted environment is not a full Windows desktop.
A Windows VPS
A Windows VPS is a remote Windows computer that you connect to with Remote Desktop. You see a normal desktop, install MetaTrader from the platform's own website, and treat it like a second PC. You can run several terminals, copy files freely and install anything you need.
The trade-off is that you now look after a Windows machine: updates, restarts, a password you must keep strong and a desktop that needs to stay running. Choose a plan with enough memory for the number of terminals you plan to open, since each MetaTrader window uses memory of its own.
Which one fits which reader
| Criterion | Built-in Virtual Hosting | Windows VPS |
|---|---|---|
| How you connect | From inside the MetaTrader terminal | Remote Desktop to a Windows desktop |
| Control | Limited to the terminal's own features | Full control of the machine |
| Several terminals or other software | Not designed for it | Yes, within the plan's memory |
| Maintenance | Handled by the service | You handle Windows and terminal updates |
| Fits | One account, a simple setup | Several accounts, custom needs |
If you run one account with one EA and want the simplest path, the built-in service is the natural place to start. If you need more control, or you run several terminals, a Windows VPS is the usual choice.
What you need before you start
- Your MetaTrader login: account number, password and the broker's server name.
- The EA files you already use: the compiled file (EX4 for MT4, EX5 for MT5) and any set files. A set file is a saved list of input settings that you load in MetaTrader.
- A note of the settings, symbol and timeframe each chart uses now.
- For a Windows VPS: the IP address, user name and password your provider gives you.
- A demo account at the same broker, so you can test the new setup without real money.
Write down the chart layout before you move anything. It is easy to forget which EA sits on which symbol and timeframe, and a wrong timeframe changes the trades the EA takes.
Also check your account type. Smart Gold Hunter EA for MT5 is listed with hedging logic, which means holding buy and sell positions on the same symbol, so confirm that your account allows it. None of the three packages contains a DLL file, so there is no DLL option to change on the VPS.
Steps to run an EA on a Windows VPS
- Connect to the VPS. On Windows, open Remote Desktop Connection, enter the VPS address and sign in with the details from your provider.
- Install MetaTrader on the VPS. Download the installer from metatrader5.com or, for MT4, from metatrader4.com, or use the installer your broker provides. Run it inside the VPS, not on your own PC.
- Log in to your trading account. Use File, then Login to Trade Account, and enter the same account number, password and server. Wait for the connection bars to turn green.
- Open the data folder. In the terminal choose File, then Open Data Folder. This is where the platform keeps its EAs, indicators and settings.
- Copy the EA files. Put the compiled EA file in the MQL5 or MQL4 folder named Experts. You can paste files through the Remote Desktop window, share a local drive in the connection options, or download the files again inside the VPS. Our guides to installing an EA on MT4 and installing an EA on MT5 cover the folder details.
- Restart the terminal. Close and reopen MetaTrader, or refresh the Navigator panel, so the EA appears in the list.
- Open the chart. Open the symbol and timeframe the EA is meant for, matching the notes you made.
- Attach the EA and load its settings. Drag the EA onto the chart, tick the option to allow algorithmic trading and load a set file from the inputs window. The guide on loading a set file in MT4 and MT5 shows how.
- Turn on the Algo Trading button (called AutoTrading in MT4). In the toolbar it should be green, and the EA's chart should show a smiling face or a running icon.
- Disconnect without signing out. Close the Remote Desktop window with the X button. This leaves the session running. Choosing Sign out ends the session and closes MetaTrader.
Using the built-in service instead
With Virtual Hosting the steps differ. Set up the EA on a chart in your local terminal first and make sure it works. Then register a virtual server from the Navigator, follow the prompts, and let the terminal migrate your account and chart setup. You do not copy files by hand.
Checks after the move
Do not assume it works because the terminal opened. Run through these checks on the first day.
- Connection: the bottom-right corner shows a ping figure and green bars, not a red cross.
- Algo Trading: the toolbar button is green, and the EA is allowed in the terminal's Options under Expert Advisors.
- Chart: the EA's name sits in the top-right corner of each chart, with the correct symbol and timeframe.
- Journal: the Experts and Journal tabs at the bottom of the terminal list messages when an EA loads or fails. Read them after the first start.
- Time zone: the VPS clock may differ from yours. Your broker's server time is what the terminal uses, but check any setting that uses a local time input.
Avoid running two copies
If the same EA stays attached on your home terminal after you move it, both copies can send orders to the same account and open duplicate trades. Remove the EA from the home chart, or close that terminal, once the VPS version is confirmed.
Keep it running
- Check the VPS every day or two, especially after a Windows update that may restart it.
- Place a shortcut to MetaTrader in the Windows Startup folder so the terminal opens after a restart. The EA reloads with the saved chart layout.
- Keep the VPS password strong and do not share it, since the machine holds your trading login.
- Test any change to the EA's inputs on a demo account before you apply it to a live one.
Common problems
The EA is attached but does not trade
First check the Algo Trading button and the smiling face on the chart. Then read the Experts tab for error messages. Common causes are an unsuitable symbol name, a timeframe the EA does not expect or a market that is closed. Work through them one at a time and change a single thing between checks.
The terminal closes after you disconnect
You probably chose Sign out instead of closing the Remote Desktop window. Reconnect, reopen MetaTrader and disconnect with the X button instead.
Orders arrive late or at worse prices
Compare the ping figure on the VPS with your home connection. If it is high, ask your provider about a location closer to your broker's server. Spreads also widen around news releases, which affects short trades more than slow ones.
Your prop firm has rules on VPS use
Firms that fund traders set their own rules on EAs and on where a terminal may run. Read them before you move a challenge account. Our guide to prop firm EA rules explains the usual rule types, and the wider prop firm EA guide covers how EAs fit into a challenge.
Before you trade live
A VPS keeps an EA running, but it cannot judge whether the EA suits you. Test the whole setup on a demo account first, watch it for a few days and check the settings before you trade live. Size positions to money you can afford to lose, and keep a plan for what you will do if the EA behaves in a way you did not expect.
Night Hunter Pro EA for MT4 is listed with martingale logic, which means increasing the lot size after a losing trade, so drawdown can rise quickly. Understand that before you leave an EA like it running unattended. If you want to try several products over time, every one of them is included in the membership.
Trading foreign exchange and CFDs carries a high level of risk and may not be suitable for all investors. Past performance does not guarantee future results; only trade with money you can afford to lose.
Tags: Expert Advisors, VPS Hosting, Prop Firms


