When 40ms decides the trade: what a VPS actually protects, and what it doesn't

●2
calendar_today ago • schedule6 min read

There's a conversation I keep having with people who run automated strategies, and it always starts in the same place: they want to know which VPS to buy. The question underneath is more interesting, and almost nobody asks it. They buy a VPS to reduce latency, assume latency is the problem, and then lose money to something the VPS was never going to fix.

So let's separate those two things properly.

1. The number, not the vibe

Round-trip time is the metric that matters, and it's the one nobody puts on a slide. It's the time between your process deciding to send an order and the broker's matching engine acknowledging it — not the ping to a marketing website, not the "network quality" score from a hosting comparison table.

The orders of magnitude are stable enough to reason about:

  • A VPS in the same city or region as the broker's servers: single-digit milliseconds, sometimes sub-millisecond if you are in the same datacentre.
  • A VPS on the same continent but a different region: 5-30ms.
  • A home connection on another continent, over a residential line, through a VPN: 100ms and up, with a long tail that is much worse than the average.

That tail is the part people miss. The median 120ms is survivable. The p99 — the one that happens during a news release, when every retail connection in your country is hammering the same route — is 800ms. Your backtest used a constant 120ms. Your strategy was never tested against the number it actually had to survive.

This is the honest case for a VPS: not "faster", but stable. You are buying a shorter, flatter distribution, and the flatness is worth more than the mean. A strategy that needs under 50ms to work and gets 120ms plus or minus 5ms behaves completely differently from one that gets 120ms plus or minus 400ms, and only one of those is a strategy you can reason about.

2. Server-side stops vs client-side stops

This is where the conversation should go, and where it usually doesn't.

There are two completely different things people call "a stop loss", and they fail in completely different ways.

The first is a stop stored on the broker's server. In MT4/MT5 terms, that's the SL field on the order. It's a record in the broker's database, checked by the broker's execution system. It does not care whether your machine is on. It does not care whether your EA is running. It does not care whether your VPS is rebooting, your ISP has dropped you, or your Windows box blue-screened mid-session. It will fire.

The second is a stop implemented in your code. Your EA watches the price, compares it to a level, and sends a close order when the level is crossed. This is logic, not a record. It executes only while your process is alive and connected. Kill the process and the stop does not exist. There is no level. There is an open position with nothing protecting it.

A trailing stop built in an EA is almost always the second kind. That's worth sitting with, because trailing stops are exactly the thing people add to "protect profits" — and adding one converts a server-side stop into a client-side one. You traded a guarantee for a conditional.

It's not that client-side logic is wrong. Sometimes you need it: a stop that depends on a computed value, a time condition, a basket, a correlation. Fine. But then you own the availability of that logic, and that means you own the process, the network, the host, and the restart path. That's a real engineering commitment, and most people make it by accident.

The question to ask about any position you're holding: if my box dies right now, what happens to this trade? If the answer requires your process to be running, you have a client-side stop, whether you meant it or not.

3. The failure mode nobody plans for

The scenario is boring and it happens constantly: a Windows update, a host migration, an out-of-memory kill, a reboot you scheduled and forgot about. The VPS comes back in ninety seconds.

Ninety seconds is an eternity.

Three things have to be true when your process comes back:

  1. The session has to survive. The terminal needs to reconnect and re-establish its session with the broker, and the broker has to still consider it valid. This usually works. When it doesn't, you find out at the worst moment.
  2. The state has to be reconciled, not assumed. Your EA's in-memory idea of the world died with the process. It knew it had two open positions and a pending order. It now knows nothing. On startup, every serious system reads the actual state back from the broker — open positions, working orders, filled orders since the last known ticket — and reconciles against what it expected. Anything that assumes "I'll just pick up where I left off" is going to double up or silently drop a position.
  3. Nothing may be left unprotected during the gap. If your only protection was client-side, the position was naked for those ninety seconds. Whether that cost you money is entirely a function of what the market did while you were gone, which is not a risk model — it's a coin flip you take on your own uptime.

The mitigation is unglamorous and it is the same as everything else in this piece: put the protection where it survives you. Server-side brackets first. Then, if you need logic on top, logic that re-establishes itself idempotently on reconnect. Then reconciliation on startup so the process never acts on a stale view.

People reach for elaborate high-availability setups — warm standby, auto-failover, a second node — to solve this. Almost none of them need it. A single VPS with server-side stops and correct reconcile-on-startup is more reliable in practice than a two-node cluster whose failover path has never been tested during an open position.

4. Where the VPS does nothing

Now the part that will annoy some people, and it's the most important section here.

A VPS does not fix a bad strategy. If the edge depends on being faster than a specific feed, or on a fill that a real order wouldn't have got, you don't have a latency problem — you have a model that doesn't match reality, and the VPS makes it fail faster and more consistently. Hosting decisions don't create edge. They only determine whether the edge you have can express itself.

A VPS does not fix bad risk. Position sizing, correlation across open trades, and what happens in a gap are decisions that don't care where your server is. A clean, fast, well-architected system that risks 5% per trade will still end the same way, only on a nicer timeline.

A VPS does not make up for not knowing your numbers. If you can't state your round-trip time, your p99, your reconnect time, and your reconcile behaviour, then buying a smaller number from a hosting provider is not going to answer any of that.

What the VPS does do is remove one class of noise: the class you can't debug, because it happens on your ISP's network at 14:30 on a Friday and you'll never see it in a backtest. That's a real and worthwhile thing to remove. It's just not the whole job.

5. A short checklist

Four questions, and they're the same four whether you're on a $12 VPS or a colocated box:

  • Latency target. Do you know your actual round-trip time to the broker, including the tail, and was your strategy tested against that number rather than a round one?
  • Stop storage. For every position you can hold: is the protection on the broker's server, or in your process? Can you say which, for each one, without looking it up?
  • Reconnect behaviour. What does your process do in the ninety seconds after a restart, in order? Does it reconcile, or does it assume?
  • Logging you can hand to someone. If a reviewer asked you what happened during a specific trade, could you produce the order, the acknowledgement, the exit, and the timestamps — or just a memory of it?

None of these are hosting questions. That's the point. The VPS is the easy, purchasable part; the discipline is the part that actually protects the position.


I write about prop firm rules and risk engineering at elitepropx.com — the boring parts that decide whether an account survives.

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Cisco's Amy Chang: A Model's "Passport" Doesn't Tell You Where It Actually Came From

Tom Smithverified - Aug 27

Make for Small Business: What It Is, What It Costs, and When to Use It

floxolab - Oct 23

Your AI Doesn't Just Write Tests. It Runs Them Too.

Kevin Martinez - May 12

EKS Auto Mode: What It Actually Changes (and What It Doesn’t)

Alexandre Vazquez - Jul 27

AAIF Hits 10 Projects. Its CTO on What to Adopt Now and the Security Gaps Left Open

Tom Smithverified - Oct 23
chevron_left
121 Points • 2 Badges
1Posts
0Comments
ElitePropX helps traders get through prop firm evaluations and keep the account — rules, sizing and risk, not signals. elitepropx.com

Related Jobs

View all jobs →

Commenters (This Week)

1 comment
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!