Applies to: MetaTrader 5 on Windows Server 2025 and Windows 10 or 11, connected over Remote Desktop
An Expert Advisor (EA) only trades while the MetaTrader 5 terminal is open and connected. On a home computer that stops whenever the PC sleeps, restarts for updates or loses its internet connection. A Windows VPS keeps the terminal running day and night. This guide covers the technical setup only; it is not trading advice.
1. Prepare the Windows VPS
- Microsoft’s minimum for Windows Server 2025 is 2 GB of RAM (4 GB recommended with the desktop). Add memory if you run several terminals or many charts.
- Connect with Remote Desktop: connect to a Windows VPS. Limit RDP to your own IP address: RDP port 3389 and how to secure it.
2. Install MetaTrader 5 and log in
- Download MetaTrader 5 from your broker (their version already knows the broker’s trade servers) or from MetaQuotes.
- Install it and log in to your trading account from the File menu.
- Check the connection indicator in the bottom-right corner: it shows the ping to the broker’s server.
3. Add your Expert Advisor
- Choose File › Open Data Folder, go to
MQL5\Expertsand copy the EA’s.ex5file there. - In the Navigator window, right-click Expert Advisors and choose Refresh.
- In Tools › Options › Expert Advisors, allow algorithmic (automated) trading.
- Click Algo Trading on the toolbar so that it is switched on (called AutoTrading in older builds and in MetaTrader 4).
- Double-click the EA in the Navigator, or drag it onto a chart. On the Common tab, allow algo trading for this EA, set its inputs and click OK.
- The EA’s name and icon appear in the upper right corner of the chart. The Experts and Journal tabs in the Toolbox (
Ctrl+T) show its messages.
4. Keep it running
- Disconnect, don’t sign out. Close the Remote Desktop window to leave the session running. Sign out closes all programs, including MetaTrader.
- Start MetaTrader after a restart. Press
Win+R, typeshell:startupand put a shortcut to MetaTrader 5 in that folder. The terminal reopens the charts and EAs of the last session. Startup items only run after the user signs in; if the server must start MetaTrader without anyone logging in, Microsoft’s Sysinternals Autologon tool can sign in automatically (use a strong password). - Plan Windows updates. Set the update restart time outside your trading hours, and check the terminal after update days.
- Keep it light. Close charts you don’t need and lower Max bars in chart (Tools › Options › Charts) if memory is tight.
Security
- Use a strong Windows password and restrict RDP to your IP address.
- Only run EAs from sources you trust: an EA is a program with access to your trading account.
- Keep Windows and MetaTrader updated.
Our Windows VPS plans include the Windows Server licence; order one and our engineers install Windows for you.
Official documentation: MetaTrader 5 help: Expert Advisors.
Ucartz services for this topic
- Hire an expert: engineers per 15 minutes, per hour or per month, with no contract.
- Server management: on-demand administration, hardening, migrations and monitoring.
