
Optimizing VPS Latency for MetaTrader
Latency is one of the most misunderstood elements of running an Expert Advisor on MetaTrader 4 or MetaTrader 5. Traders often obsess over strategy logic while ignoring the milliseconds that separate their VPS from the broker’s trade server. For any EA that trades on short timeframes, uses tight stops, or reacts to news, those milliseconds directly shape fill quality, average spread paid, and how often a stop loss is slipped by a meaningful amount. This guide explains what VPS latency actually is, how to measure it correctly, and how to reduce it without falling for marketing gimmicks.
What VPS Latency Means for MetaTrader
Latency is the round-trip network delay between your MetaTrader terminal (running on a VPS) and your broker’s trade server, measured in milliseconds. A quote leaves the broker, hits your terminal, your EA decides, an order goes back, and the broker confirms. Every step adds delay, and the total round-trip is what genuinely affects execution.
For most retail EAs, anything under 20 ms is considered fast, 20-50 ms is acceptable, and above 100 ms will start to visibly harm scalping and news-driven strategies. Latency does not affect swing EAs holding positions for days in any meaningful way, but it matters enormously for grid, scalping, and arbitrage-style logic. On very fast strategies, even a stable 60 ms round-trip can be the difference between capturing a move and paying a spread just to enter after it.
MetaQuotes describes the value of running the terminal close to the broker in its official documentation on virtual hosting for MetaTrader, which is worth reading before choosing any VPS location.
How to Measure Latency Correctly
Do not trust “ping to google.com” as a proxy for broker latency. What matters is the path between your VPS and your broker’s specific trade server, not the general internet.
- In MetaTrader, hover over the connection status in the bottom-right corner to see the current ping.
- Use the Journal tab to look for order execution times.
- Run a script or EA that logs OrderSend round-trip time in milliseconds.
- Test at different times of day, including the London and New York session opens, when servers are under stress.
- Record readings during known high-volatility events such as scheduled central bank releases.
A single 15 ms reading during a quiet hour is not representative. You want a consistent low figure across busy periods, ideally with a stable standard deviation. A VPS averaging 5 ms but jumping to 200 ms twice a day is worse for automated trading than one that averages 20 ms with almost no variance.
Choosing the Right VPS Location
The single biggest factor in reducing latency is physical distance to the broker’s server. A VPS in London will beat a VPS in Sydney for a UK-based broker every time, regardless of hardware.
| Broker server region | Recommended VPS region | Typical latency band |
|---|---|---|
| London (LD4/LD5) | London | 1-5 ms |
| New York (NY4) | New York / New Jersey | 1-5 ms |
| Tokyo (TY3) | Tokyo | 1-5 ms |
| Frankfurt (FR2) | Frankfurt | 1-5 ms |
| Amsterdam (AM3) | Amsterdam | 1-5 ms |
Ask your broker where their MT4/MT5 trade server is physically hosted. Many major brokers use Equinix data centres such as LD4, NY4, or TY3. Providers such as QuantVPS, ForexVPS.net, TradingFXVPS, and FXVM publish their data centre locations so you can match them to your broker. If the broker cannot tell you where the server actually sits, treat that in itself as a red flag.
Practical Steps to Reduce Latency
Once your VPS is in the right region, further gains come from configuration rather than location.
- Pick the closest data centre, not just the closest country. London-Slough is not the same as London city, and the actual cable path between them still adds real milliseconds.
- Use a dedicated or high-tier VPS plan rather than an oversold shared plan. Shared CPU spikes translate directly into MT4/MT5 processing delay.
- Keep the VPS lean. Do not install browsers, media software, or antivirus scanners that scan MetaTrader files in real time.
- Run one terminal per VPS where possible, or use MT5’s multi-account setup carefully. Each terminal consumes RAM and CPU.
- Disable unnecessary charts and indicators. A single M1 chart with three heavy custom indicators can add tens of milliseconds of tick processing time.
- Monitor over time. Latency drifts as brokers change routing or upgrade infrastructure, and a VPS that was excellent six months ago may quietly degrade.
- Restart the terminal weekly. Long-running MT4/MT5 sessions can accumulate memory pressure that slows tick processing.
Beyond the Network: Execution Latency
Network ping is only part of the story. Execution latency is the total time from your EA’s decision to the broker’s confirmation. It includes:
- Broker order queue time
- Liquidity provider response
- Requote logic (in Instant Execution mode)
- Fill policy handling (Fill or Kill, Immediate or Cancel, Return)
- Internal broker risk-check time on the order
A 2 ms ping to a broker with a slow matching engine can still produce 300 ms average execution. This is why comparing brokers matters as much as comparing VPS providers. Our vetted VPS comparison explains what to look for when matching a VPS to a broker.
Common Mistakes That Add Hidden Latency
- Running the VPS in a country far from the broker “because it’s cheaper”.
- Using a home PC with a fibre connection and assuming it is faster than a properly located VPS. It rarely is.
- Ignoring CPU steal on cheap oversold plans.
- Testing latency once and never rechecking after a broker migration.
- Leaving multiple browser windows and RDP sessions open on the VPS during trading hours.
- Enabling Windows automatic updates during market hours, which briefly stalls MetaTrader.
FAQ
How much latency is too much for an EA?
For scalping and news EAs, above 50 ms noticeably degrades fills. For swing EAs, 100-200 ms usually has negligible impact.
Does a faster internet connection at home fix the problem?
No. Consumer connections add jitter, packet loss, and routing hops that a properly located VPS avoids.
Can I test latency before subscribing to a VPS?
Most reputable VPS providers offer a free trial or a money-back window. Use it to measure your specific broker.
Is 1 ms latency a real claim?
It is possible only when the VPS is in the same data centre as the broker’s trade server. Otherwise, it is marketing language.
Does MetaTrader’s built-in VPS help?
The MQL5 Virtual Hosting service can be a strong option when the migration point is close to the broker, but it must still be evaluated by measured latency, not brand.
Is latency the same as slippage?
No. Latency is transport delay. Slippage is the price difference between what you requested and what was filled. High latency tends to increase slippage, but they are separate measurements.
Trading foreign exchange and CFDs on margin carries a high level of risk and may not be suitable for all investors. This article is for educational purposes only and does not constitute financial advice.
Compare Vetted VPS Options
Latency is measurable, and choosing the right VPS starts with matching a data centre to your broker’s server. See our independently reviewed best VPS providers for MT4 and MT5 to compare locations, hardware, and pricing before you commit.

