Lesson 8. Execution & Infrastructure — Ping, Latency, PC vs VPS
Speed and stability decide how your EA fills. Learn how to measure and improve ping/latency, when a VPS beats a home PC, what slippage/spreads do at news/rollover, and how to keep MT5 reliable 24/5.
8.1. Why speed and stability matter (execution chain mental model)
EA decides → sends order → your network → broker trade server → liquidity provider → fill/partial → confirmation back to MT5.
- Latency = travel time there and back; Slippage = price difference between requested and filled.
- Unstable terminal/Internet = missed opportunities, duplicate errors, or no trades.
| Factor | Impact |
|---|---|
| Latency | Impacts scalpers most; minor for H1 swing. |
| Spread/Slippage | Impact all, especially small TP targets. |
| Uptime | If MT5 is down, EA can't trade. |
8.2. Measure your latency (MT5 & OS)
- In MT5: Login window/server list shows ping (ms) to the broker server; also visible in the bottom status bar on some builds.
- OS ping (approx network RTT): Windows 'cmd → ping broker_server', macOS 'ping broker_server'. Not equal to order latency, but a proxy.
Latency Quality Guide
Scalping capable (with tight spreads)
Fine for most intraday/swing EAs
Poor for scalping; acceptable for H1 swing; consider VPS near broker
8.3. Home PC vs VPS near the broker
Pros
- • No extra cost
- • Easy access
Watch-outs
- • OS updates/restarts
- • ISP outages
- • Power cuts
- • Higher latency to broker
- • User shutdowns
Pros
- • Low latency (often 1–20 ms)
- • 24/5 uptime
- • Datacenter power/network
Watch-outs
- • Monthly cost
- • Need secure setup
- • Remote access learning curve
Scalpers & frequent intraday EAs
VPS close to broker is recommended
H1 swing/testing/learning
Home PC OK; move to VPS before live scaling
VPS Setup Tips:
- • Pick a VPS location close to broker's server (often in London/NY/Frankfurt).
- • Windows Server minimal install; MT5 auto-start at login; disable auto sleep; schedule Windows updates out of trading hours.
8.4. Slippage & spreads: what changes at news and rollover
Spread
ask − bid; widens at low liquidity (rollover) and around news.
Slippage
Filled price worse/better than requested; increases at news/rollover and with higher latency.
When Do They Increase?
- • Rollover (around broker midnight): spreads often widen sharply; avoid opening new trades 10–20 minutes around this time.
- • High-impact news: spreads and slippage spike; many EAs include blackout windows.
Cost Impact Example:
If your TP is 8 pips and costs (spread+slippage+commission) are ~2.2 pips, 27.5% of your target is costs — margin for error is small.
8.5. Reliability 24/5: keep MT5 running
- MT5 set to auto-start on OS login; EA attached with 'Allow algo trading' enabled.
- Windows updates scheduled outside trading hours; automatic restarts planned.
- Disable system sleep/hibernation; keep power settings 'Always on.'
- Push/email alerts configured (Tools → Options → Notifications).
- Auto-reconnect (MT5 default); log review daily (Journal/Experts).
- Separate terminals for different accounts/strategies; avoid overload (close unused charts).
- Backup .set presets and logs weekly.
- If on home PC: UPS and redundant Internet (tether backup) are helpful.
8.6. Decision helper: Is VPS worth it for me?
Recommendation:
Fill in all fields to see recommendation.
8.7. Slippage/Spread Cost-to-Target Calculator
Formulas:
Cost (pips) = spread + slippage + (commission / pipValue)
Cost/Target % = (costPips / targetTP) × 100
8.8. Practice: measure, decide, and harden (10–15 min)
Lesson 8 Quiz
Test your understanding with 3 questions. Pass with 2/3 correct.