All Playbooks
Playbook

VPS Setup & EA Monitoring

Your EA needs to run 24/7 without you watching. Set up reliable infrastructure that trades while you sleep and alerts you when something goes wrong.

11 min read
Intermediate

VPS Requirements

SpecificationMinimumRecommendedNotes
RAM2 GB4 GBAdd 512MB per additional MT4/MT5 instance
CPU1 vCPU2 vCPUMore cores help with multiple terminals
Storage40 GB SSD60 GB SSDSSD required for fast execution
LocationSame continent as brokerSame city as broker serverLower latency = better execution
Uptime99.5%99.9%+Check provider's SLA guarantee

5-Step VPS Setup

1Choose & Configure VPS

  • Select Windows VPS (Linux doesn't run MT4/MT5 natively)
  • Choose location closest to your broker's servers
  • Start with minimum specs, upgrade if needed
  • Set up Remote Desktop (RDP) access
  • Create a strong password and enable firewall

2Install Trading Platform

  • Download MT4/MT5 from your broker's website
  • Install to default location
  • Log in with your trading account
  • Enable 'Allow automated trading' in options
  • Disable automatic updates (stability)

3Deploy Your EA

  • Copy EA file to MQL4/Experts or MQL5/Experts folder
  • Restart MT4/MT5 or refresh Navigator
  • Drag EA onto desired chart
  • Configure EA settings and save preset
  • Verify EA shows 'smiley face' (enabled)

4Configure Auto-Recovery

  • Set MT4/MT5 to auto-start on Windows boot
  • Create a scheduled task to restart if crashed
  • Save chart template with EA attached
  • Document recovery procedure
  • Test recovery by rebooting VPS

5Set Up Monitoring

  • Install or configure uptime monitoring service
  • Set up email/SMS alerts for disconnection
  • Configure daily health check reminders
  • Enable MT4/MT5 email notifications
  • Create monitoring dashboard (optional)

Auto-Restart Script

MT5 Auto-Restart Batch Script

Save this as check_mt5.bat and schedule it to run every 5 minutes using Windows Task Scheduler.

@echo off
REM Auto-restart MT5 if not running
tasklist /FI "IMAGENAME eq terminal64.exe" | find /I "terminal64.exe" > NUL
IF ERRORLEVEL 1 (
  start "" "C:\Program Files\MT5\terminal64.exe"
  echo %date% %time% - MT5 restarted >> C:\logs\mt5_restart.log
)

Monitoring Setup

VPS Uptime Monitor

Alerts when VPS goes offline

Tools: UptimeRobot, Pingdom, StatusCake (free tiers available)

Setup: Monitor VPS IP address, alert via email/SMS

MT4/MT5 Connection Status

Detects platform disconnection from broker

Tools: Built-in email alerts, external scripts

Setup: Configure SMTP in MT4/MT5, enable connection alerts

Trade Activity Monitor

Alerts on trade opens, closes, and errors

Tools: EA's built-in alerts, Telegram bots, push notifications

Setup: Configure EA to send notifications on trade events

Daily Health Check

Manual or automated daily status review

Tools: Calendar reminder, automated scripts

Setup: Set daily reminder to verify EA running correctly

VPS Deployment Checklist

VPS located near broker serversCritical
Windows VPS with RDP access configuredCritical
MT4/MT5 set to auto-start on bootCritical
EA deployed and verified runningCritical
Uptime monitoring with alerts enabledCritical
Recovery procedure tested (reboot test)
Trade notifications configured
Daily health check reminder set
VPS credentials securely stored
Backup of EA settings and presets saved

Common VPS Mistakes

Using the cheapest VPS available

Why it matters: Unstable, oversold resources, frequent downtime. Missed trades and disconnections.

Fix: Use reputable providers (Contabo, Vultr, DigitalOcean, AWS Lightsail). Pay for reliability.

No auto-recovery setup

Why it matters: VPS reboot or MT4/MT5 crash = EA stops trading until you manually intervene.

Fix: Configure auto-start and scheduled recovery checks. Test by forcing a reboot.

VPS located far from broker

Why it matters: High latency = slippage, requotes, failed orders. Especially bad for scalping.

Fix: Ask broker where their servers are. Choose VPS in same region or city.

No monitoring or alerts

Why it matters: Problems can go unnoticed for hours or days. Open positions without management.

Fix: Set up uptime monitoring + trade alerts. Know within minutes if something fails.

Running too many terminals on weak VPS

Why it matters: Overloaded VPS = slow execution, freezes, crashes. All EAs suffer.

Fix: Start with 1-2 terminals. Monitor resource usage. Upgrade before hitting limits.

Templates & Scripts

Auto-Restart Script Bundle

Batch scripts for MT4 and MT5 auto-recovery.

VPS Setup Checklist PDF

Printable checklist for complete VPS deployment.

Build Your 24/7 Trading Bot

Create an EA ready for VPS deployment and continuous operation.

Start Building