Summary: Deploy MT4 on VPS to keep EA running 24/7. This guide covers VPS selection, remote installation, EA setup, and auto-start configuration to avoid downtime.
Step 1: Choose a Suitable Forex VPS
Select a VPS provider with low latency to your broker's server (preferably under 5ms). Recommended specs: 2GB RAM, 2-core CPU, 20GB SSD. Screenshot: VPS plan selection interface showing latency test.
Step 2: Get VPS Login Credentials
After purchase, you will receive an IP address, username, and password. Use Remote Desktop Connection (Windows: search "mstsc"). Screenshot: Remote Desktop login window.
Step 3: Connect to Your VPS
Enter the IP, click Connect, then input username and password. Tick "Remember me" for future convenience. Screenshot: credentials entry.
Step 4: Download and Install MT4 on VPS
Open a browser inside the VPS, go to your broker's website, download the MT4 installer, and run it. Use default installation paths. Screenshot: MT4 installer running.
Step 5: Log into Your Trading Account
Open MT4, click File > Login to Trading Account, enter your account number and password. Select the correct server. Screenshot: login window with fields filled.
Step 6: Install Your EA on VPS
Click File > Open Data Folder > MQL4 > Experts. Copy your EA (.ex4 or .mq4 file) into this folder. Restart MT4 or right-click Navigator > Refresh. Screenshot: data folder path and file paste.
Step 7: Attach EA and Allow DLL Calls
Drag the EA to a chart. In the popup, check "Allow DLL imports" and "Allow live trading". Click OK. Screenshot: EA settings window with both boxes checked.
Step 8: Enable Auto-Trading
Click the "AutoTrading" button on MT4 toolbar (or press Ctrl+E). The button should turn green. Also check that the EA smiley face appears on the chart. Screenshot: toolbar with green AutoTrading button.
Step 9: Set VPS to Keep MT4 Running After Disconnect
In VPS, disable sleep mode: Control Panel > Power Options > select "High performance" and "Never" turn off display. Set MT4 to start with Windows: copy MT4 shortcut to Startup folder (shell:startup). Screenshot: power options and startup folder.
Step 10: Test Disconnection
Close your local Remote Desktop window (do not log off). Wait 10 minutes, then reconnect. Check if EA is still running on the chart. The smiley face should remain. Screenshot: chart showing EA active after reconnection.
Reference: MetaQuotes VPS recommendations / MQL5 Community VPS deployment guide.