Expert Advisor on VPS: step-by-step setup

Why Expert Advisor belongs on a VPS rather than a home computer is explained in our article. Why every forex trader needs a VPS serverHere we focus on the practical side: how to set up MT4 or MT5 on a VPS so that the EA runs reliably even after a server reboot and you can verify it is actually trading.

Preparing a VPS for MetaTrader

MT4 and MT5 are natively built for Windows, so choose a VPS with Windows Server. Connect to the server via Remote Desktop (RDP), simply enter the IP address, username and password provided after activation. In the RDP client settings, we recommend enabling clipboard sharing (to copy configuration files between your computer and the VPS) and setting the screen resolution that allows you to work comfortably in MetaTrader.

1

MetaTrader Installation

Download the MT4/MT5 installation file directly from your broker and install it on the VPS just as you would on a standard computer.

2

Log in to account

Enter the account login number, password and broker server. Verify that the platform has connected and is receiving quotes.

3

Uploading the Expert Advisor

Copy the EA file to the MQL4/Experts folder (or MQL5/Experts), compile it in MetaEditor and restart MetaTrader.

4

Permission for algorithmic trading

In the toolbar, enable the AutoTrading button and in the EA settings confirm that DLL import is allowed if required by the strategy.

After dragging the EA onto the chart, check the smiley icon in the top right corner: a green smiley means the EA is running and algorithmic trading is active. A red cross or sad face indicates something is preventing startup, most commonly AutoTrading being disabled or missing permissions.

Automatic start after VPS restart

Windows on the VPS occasionally restarts due to updates or provider maintenance, and without proper configuration, neither MetaTrader nor EAs would launch automatically after a restart. Solution:

  1. MetaTrader representative to the Startup folder - the simplest option. Place a shortcut to the MT4/MT5 executable file in shell:startup (type into the File Explorer address bar) and the platform will launch immediately after logging into Windows.
  2. Automatic logon to Windows - Without auto-login, the VPS will remain on the login screen after a restart and MetaTrader will not start at all because the user session will not launch. Configure automatic login using the tool. netplwiz.
  3. Scheduled Task (Task Scheduler) - For a more reliable solution, create a task that runs at system startup with the highest privileges, regardless of whether a session is logged in.
Check after restart: After the initial VPS setup, manually restart it (do not just log out) and verify that MetaTrader has launched automatically and the EA is running with a green smiley icon, without this test, you are relying on settings you have never seen work.

How to ensure the EA is actually running

Commissioning is only the first step. You need to know that the EA isn't running idle due to a logic error or connection failure. A proven combination:

Typical errors in configuration

Most common pitfalls:

Before deploying EA in live trading, we recommend running the entire setup for at least one day on a demo account to verify it survives a standard server restart. Latency to the broker's server, which affects execution quality, is discussed in detail in the article. Latency in Forex: Measuring and Causes of Delay.

VPS with Windows Server for MT4/MT5

A server ready for MetaTrader within minutes, with Czech support if you need help with the setup.

Display VPS price list