Latency, execution and the VPS

By Otto Research 3 min read Article 51 of 95

Latency is the time an order takes to travel from the platform to the broker's server, be executed, and return a confirmation. From a home computer it is typically tens to a few hundred milliseconds. From a server in the same data centre as the broker it can be a few milliseconds. During that time the price can move, and the difference between the requested and filled price is slippage.

Which strategies care

A strategy that trades at the open of a daily bar and holds for a week does not care about a hundred milliseconds. The price moves a fraction of a pip in that time, against an average trade of tens of pips. A strategy that trades on one-minute bars, or reacts to ticks, or places orders in the seconds around news, cares a great deal, because its whole edge is a few pips and the delay can be most of them.

The general rule is that sensitivity to latency rises as the holding period shortens and as the average trade shrinks. Any strategy whose vendor stresses execution speed is telling you its edge is fragile.

What the VPS does

A VPS located near the broker's server reduces the round trip to a few milliseconds and, more importantly, provides a stable connection that does not drop, sleep or restart. For most EAs the stability is the point and the speed is incidental. For the minority that are latency-sensitive, choosing a VPS in the broker's data centre is part of the setup, and the vendor will usually say which.

Measuring execution

The trade history records the requested and filled prices, and the difference, averaged over many trades, is the broker's execution quality for that strategy. Ping to the broker's server, shown in the platform's connection status, measures latency directly. A demo account does not measure execution at all, since demo fills are instantaneous and exact; only a live account, even a very small one, does.

Worked example

Two brokers show identical spreads on gold. An EA placing 200 stop orders a year at each shows average slippage of 0.11 dollars at the first and 0.34 at the second, from the filled prices in the history. On one lot, that is $22 against $68 per trade, $4,400 against $13,600 a year. The spreads were the same. The execution was not, and the second broker cost the strategy three times as much without ever appearing on a comparison table.

What this means when an EA is trading

For an EA on hourly or higher timeframes, use any reliable VPS and stop thinking about latency. For an EA on short timeframes, use the VPS location the vendor recommends, measure slippage on a small live account before scaling up, and treat the measured slippage as a cost of the strategy at that broker. If a vendor's live record was produced at a particular broker and VPS, the results at any other combination will differ, and the shorter the strategy's holding period, the more they will differ.

From theory to live

See it put to work.

The concepts on these pages are what Otto is built on. Watch it trade them live, on real accounts.