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.
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.
Log in to account
Enter the account login number, password and broker server. Verify that the platform has connected and is receiving quotes.
Uploading the Expert Advisor
Copy the EA file to the MQL4/Experts folder (or MQL5/Experts), compile it in MetaEditor and restart MetaTrader.
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:
- 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. - 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. - 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.
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:
- Journal and Experts Cards in MetaTrader - records errors, warnings and open/closed trades; this is the first place to check
- Push notifications and email alerts from MT4/MT5 - in the platform settings, you can enable alerts for each transaction directly to your mobile phone
- External availability monitoring for VPS - Free tools such as UptimeRobot monitor whether the server is responding at all, regardless of what happens inside MetaTrader.
- Regular manual checks via RDP - especially after significant market movements or the release of macroeconomic data, it is worth taking a brief look.
Typical errors in configuration
- Forgotten automatic Windows login: EA fails to start after reboot because the user session does not launch.
- AutoTrading disabled after restarting MetaTrader: the platform does not always reliably retain this state; it must be checked after every restart.
- Different time zones between the broker's server and the local EA settings, for strategies sensitive to trading sessions, this shifts entries by hours.
- Insufficient RAM when running multiple EAs and multiple charts simultaneously: the platform slows down or stops responding.
- Windows update launched during trading hours: schedule maintenance outside of EA's active trading period.
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