What Are Expert Advisors and Why Run Them on a VPS?
Expert Advisors (EAs) are automated trading programs that run inside MetaTrader 4 or MetaTrader 5. They analyze price action, generate signals, and execute trades without human intervention. The biggest challenge with EAs is that they need to run continuously — 24 hours a day, 5 days a week. A single interruption can mean missed entries, failed exits, or EAs making decisions based on outdated data.
A Forex VPS solves this problem completely. Your EAs run on enterprise-grade infrastructure with backup power, redundant internet, and 99.9% uptime. Even when your laptop is off, your home WiFi drops, or there is a power cut in your neighborhood, your trading bots keep working.
Step 1: Transfer Your EA Files to the VPS
If you purchased or developed EAs on your local computer, you need to move them to your Forex VPS. Here are three methods:
Method 1: Using RDP Local Resources (Easiest)
- Before connecting via RDP, click Show Options
- Go to the Local Resources tab
- Click More under Local devices and resources
- Check the drives you want to share (e.g., your C: drive)
- Connect to the VPS
- Open File Explorer on the VPS — your local drives appear under Redirected drives
- Copy your EA files from your local drive to:
C:Program FilesMetaTrader 4MQL4Experts
Method 2: Download Directly on the VPS
- Inside your VPS, open Microsoft Edge
- Log into your email, cloud storage (Google Drive, Dropbox), or EA provider portal
- Download the EA files directly to the VPS
- Move them to the correct Experts folder
Method 3: Using File Transfer Tools
- Install FileZilla or WinSCP on your local machine
- Use SFTP to transfer files to the VPS (requires enabling SSH on Windows)
- This method is faster for large files or multiple EAs
Step 2: Install the EA in MetaTrader
- Restart MetaTrader after copying the EA files
- Open the Navigator panel (Ctrl + N if hidden)
- Expand the Expert Advisors section
- Your EA should appear in the list. If not, right-click and select Refresh
Step 3: Attach the EA to a Chart
- Open the chart for the currency pair and timeframe your EA is designed for
- Drag the EA from the Navigator onto the chart
- The Expert Properties window opens
- Configure the parameters:
- Lot size or Risk percentage — start small for testing
- Magic number — unique identifier so the EA tracks its own trades
- Slippage — maximum allowed slippage in points
- Take profit and Stop loss — if managed by the EA
- On the Common tab, check:
- Allow Live Trading — must be enabled for real account trading
- Allow DLL Imports — only if your EA requires external libraries
- Allow Import of External Experts — if your EA calls other EAs
- Click OK
Step 4: Enable AutoTrading
Even with the EA attached, it will not trade until AutoTrading is enabled:
- Look at the toolbar — the AutoTrading button looks like a green play icon
- Click it to turn it green
- In the chart top-right corner, you should see a smiley face — this means the EA is active and trading is allowed
- If you see a sad face, check that AutoTrading is enabled and that the EA properties allow live trading
Step 5: Configure Risk Management Settings
Before letting any EA trade real money, understand and set these critical parameters:
Lot Size vs Risk Percentage
- Fixed lot: The EA uses the same lot size for every trade. Simple but dangerous if not sized correctly.
- Percentage risk: The EA calculates lot size based on your account balance and risk percentage per trade. Recommended for most traders.
Maximum Spread
Set a maximum spread filter. During news events, spreads can widen to 20-50 pips. Your EA should not trade during these conditions:
- Most EAs have a MaxSpread parameter
- Set it to 2-3 times your broker average spread
- For EUR/USD, if average spread is 1 pip, set MaxSpread to 3-5 pips
Trading Hours
- Configure which trading sessions the EA operates in (Asian, London, New York)
- Some EAs perform poorly during low-liquidity Asian sessions
- Others are specifically designed for London or New York volatility
News Filter
- High-impact news events (NFP, interest rate decisions) can cause extreme volatility
- Many EAs include a news filter — enable it and set the buffer time (e.g., stop trading 30 minutes before and after major news)
Step 6: Set Up Auto-Restart After VPS Reboot
Windows updates and maintenance can restart your VPS. Without auto-start, your EAs sit idle until you manually log in. Here is how to prevent that:
Create Startup Shortcuts
- Press Win + R, type
shell:startup, press Enter - This opens the Windows Startup folder
- Create a shortcut to your MetaTrader executable:
- Right-click > New > Shortcut
- Browse to
C:Program FilesMetaTrader 4 erminal.exe - Name it clearly (e.g., MT4_ICMarkets)
- Repeat for each MT4 instance you run
Create a Batch File for Multiple Instances
If you run multiple MT4 terminals, a batch file ensures they start in order with delays:
- Right-click on your desktop > New > Text Document
- Name it
start-trading.bat - Add this content:
@echo off echo Starting trading platforms... start /high "" "C:Program FilesMetaTrader 4 erminal.exe" timeout /t 10 /nobreak start /high "" "C:Program FilesMetaTrader 4_Broker2 erminal.exe" timeout /t 10 /nobreak start /high "" "C:Program FilesMetaTrader 5 erminal64.exe" echo All platforms started successfully!
- Save the file and move it to the Startup folder
- Right-click the batch file > Properties > Compatibility > Check Run as administrator
Step 7: Test on Demo Before Going Live
Never attach a new EA to a live account without testing. Follow this protocol:
- Backtest first: Use MT4 Strategy Tester with tick data to verify the EA logic
- Demo test for 2 weeks: Run the EA on a demo account under real market conditions
- Compare performance: Demo results should match backtest within reasonable variance
- Start with micro lots: Even on live, begin with 0.01 lots to verify execution
- Monitor daily: Check the Experts tab for errors and the Account History for unexpected trades
Step 8: Monitor EA Performance
Once live, use these tools to track your EA:
MetaTrader Built-in Monitoring
- Experts tab: Shows EA activity, errors, and trade execution details
- Journal tab: Logs all platform events including connection issues
- Account History: Review closed trades, entry/exit prices, and slippage
Windows Task Manager
- Press Ctrl + Shift + Esc
- Check CPU and RAM usage — if RAM exceeds 80%, consider upgrading your VPS plan
- Each MT4 instance uses 200-500 MB RAM; each active EA adds 50-150 MB
Common EA Issues and Solutions
| Issue | Cause | Solution |
|---|---|---|
| EA not placing trades | AutoTrading disabled | Click AutoTrading button to turn green |
| Trade context busy error | Multiple EAs trading same pair | Use different magic numbers or separate charts |
| Order send failed | Invalid lot size or stop level | Check broker minimum lot and stop level requirements |
| EA stops after VPS restart | No startup shortcut configured | Add MT4 shortcut to Windows Startup folder |
| High slippage on every trade | Latency too high or volatile market | Check latency, add spread filter, avoid news trading |
| Account not authorized | Wrong password or server | Re-login with correct credentials from broker |
Security Best Practices for EA Trading
- Change default RDP password: Use a strong, unique password with 12+ characters
- Enable Windows Firewall: Only allow RDP from your IP address if possible
- Backup EA settings weekly: Export your EA presets and save them locally
- Use a VPS-dedicated email: Do not use your personal email for broker notifications
- Monitor for unauthorized access: Check Windows Event Viewer for unusual login attempts
Next Steps
Your Expert Advisors are now running on a professional-grade Forex VPS. For advanced topics — including multi-EA management, latency optimization, and backtesting strategies — explore our other guides in the HostPeppy Knowledge Base.
Running into issues? Our support team understands both trading platforms and automated strategies. Open a support ticket and we will help you get your EAs running perfectly.