On this page
Slippage is the difference between the price requested or observed and the price at which an order is actually filled. It can be positive or negative. Latency is one contributor, but price movement, liquidity, order size and server handling also determine the result.
Slippage, latency and requotes are different
Slippage is a price difference. Latency is a time delay between an action and the broker server response. A requote occurs when the requested price is no longer available under an execution mode that asks the trader or program to accept another price. An order rejection is different again: the server may refuse a request because of volume, stops, market status, permissions or insufficient margin.
| Event | What you see | Useful evidence |
|---|---|---|
| Slippage | Fill price differs from requested price. | Order request, fill and spread at the same timestamp. |
| Latency | Execution or modification takes longer. | Terminal log times and broker-side execution report. |
| Requote | A new price is offered instead of the requested one. | Journal message and the symbol’s execution mode. |
| Reject | The server does not accept the request. | Error code, parameters and contract specification. |
Interpret execution evidence alongside the account’s broker execution model. Persistent changes across comparable requests belong in EA drift monitoring and revalidation; one unusually good or bad fill is not enough to justify retuning the strategy.
Why an automated order can receive a different result
Between signal calculation and fill, the market can move. Available volume at the best price may be smaller than the order, especially around releases, session transitions or rollover. The broker can aggregate quotes, apply a markup, validate stops and margin, and then route or internalize the order according to its policy. Each step can add time or change the executable price.
VPS-to-server distance matters, but a low network ping does not measure queueing, bridge processing, liquidity-provider response or the time used by the EA itself. Large order size, rapid modifications and several simultaneous positions may produce different results from a single small test trade.
Measure a distribution, not one trade
- Synchronize the VPS clock and preserve MT4 Experts and Journal logs.
- Record symbol, side, order type, requested price, fill price, lot size and timestamps.
- Store bid/ask spread at the request and identify rollover or scheduled news.
- Separate market entries, pending-order triggers, closes and stop modifications.
- Calculate positive and negative slippage separately, plus median and tail outcomes.
- Compare demo and live only when settings, timing and broker entity are equivalent.
Favorable and adverse fills can offset in the mean while a few severely adverse fills cause most of the damage. Review percentiles and worst cases as well. The sign convention used here is defined below.
Reduce the impact without distorting the strategy
Do not simply widen every tolerance. Excessive deviation can convert a controlled entry into an unfavorable fill, while an overly strict tolerance can create repeated retries or missed exits. The correct limit depends on the strategy’s expected edge, timeframe and risk model.
Common interpretation mistakes
Do not treat every losing trade as broker manipulation, compare bid-only charts with buy fills, or judge execution from a screenshot without the contemporaneous ask price. Do not compare a demo order with a live order placed seconds later, and do not assume that a faster VPS fixes thin liquidity. First reconstruct the complete order event from logs and account history.
For an EA, reliable error handling matters as much as normal fills. The program should avoid uncontrolled retry loops, duplicate orders and silent failures after a disconnect.
Use one sign convention for execution comparisons
Define positive slippage as an adverse cost. For a BUY request, calculate fill price − requested price; for a SELL request, use requested price − fill price. Negative values then represent favorable price improvement. Closing a BUY position is a SELL operation; closing a SELL position is a BUY operation.
Hypothetical BUY: requested 1.10020, filled 1.10035. The adverse difference is 0.00015: 15 points when Point = 0.00001, or 1.5 pips when one pip is 0.00010. State the symbol’s units before comparing other instruments.
Measure the interval and recover uncertain outcomes
For terminal-observed request latency, measure from sending the request to receiving its result using the same clock. Network ping, signal-to-request delay and server processing are different intervals. Do not subtract timestamps from unsynchronized machines and call the result execution latency.
The MT4 slippage/deviation parameter is not a universal fill-price guarantee; its effect depends on the execution context. A requote, rejection and timeout are different outcomes. After an uncertain result, reconcile the order pool and history before a bounded retry. Compare signed fill distributions and missing trades separately, including adverse tails rather than only an average.
The official OrderSend documentation explains requested prices, slippage and error handling.
Use the side of the execution operation, including exits
With adverse slippage defined as positive, a BUY operation uses fill minus reference price. A SELL operation uses reference minus fill. Closing a long position is a SELL operation, and closing a short position is a BUY operation. Using the original position direction for both ends reverses the exit calculation.
These invented EUR/USD observations use one pip = 0.00010. The reference is the executable side recorded when the request was sent. They are teaching examples, not observed fills from a broker.
| Action | Reference → fill | Signed cost |
|---|---|---|
| Open a long: BUY | 1.10020 → 1.10035 | +1.5 pips |
| Close that long: SELL | 1.10100 → 1.10090 | +1.0 pip |
| Open a short: SELL | 1.10000 → 1.09992 | +0.8 pip |
| Close that short: BUY | 1.09900 → 1.09895 | −0.5 pip |
The first pair has a total adverse execution difference of 2.5 pips relative to its two request-time references. The short example totals 0.3 pip after the favourable exit offsets part of the adverse entry. Keep each observation too: a favourable average does not remove an adverse tail.
A chart close, an EA signal price and a request-time quote are different reference choices. Name the one used. If the reference was reconstructed from a later screenshot, an exact request-to-fill slippage claim is not supported.
Read a small distribution without hiding the worst observation
Consider ten invented signed observations, in pips: −0.4, −0.2, 0.0, 0.1, 0.1, 0.2, 0.2, 0.3, 0.5 and 2.0.
| Summary | Value | Interpretation |
|---|---|---|
| Mean | +0.28 pip | The signed average includes both improvement and adverse fills. |
| Median | +0.15 pip | The average of the fifth and sixth ordered values. |
| 90th percentile, nearest-rank | +0.5 pip | The ninth ordered value; another percentile convention can differ. |
| Worst observed adverse value | +2.0 pips | The largest observation remains relevant even when the median is small. |
Ten observations are used only to make the arithmetic visible. They are too few to establish reliable tail behaviour or rank a broker. Record the sample size and method whenever reporting a percentile, and compare like operations, volumes and market conditions.
Keep rejected requests and uncertain results outside the fill-price distribution until their status is established. Report their counts alongside it. A collection of excellent fills can still be operationally unsuitable if many required exits or modifications were rejected.
Distinguish a measured delay from its possible cause
If the same monotonic terminal clock records a send at 10:00:00.000 and a response at 10:00:00.180, the measured request-response interval is 180 milliseconds. This illustrative interval includes the path observed by the terminal; it is not a measurement of the broker’s internal processing alone.
A request can wait because of terminal work, communication, server handling or other parts of the route. A VPS ping measures a different exchange. Comparing independent machine clocks without confirming their alignment cannot isolate these components.
After a timeout or disconnect, reconcile account records before deciding that a new request is needed. Preserve the symbol, side, volume, request time, error and any returned ticket. Where the evidence cannot determine whether an order was accepted, retain an uncertain status and seek the appropriate broker or developer explanation.
Frequently asked questions
Is a positive value good in this guide?
Here a positive signed value means an adverse execution cost. A negative value means price improvement. The convention must be stated because other reports may use the opposite sign.
Is the requested price always available for execution?
No. Price availability and request handling depend on the account, order type, market conditions and execution mode. A deviation parameter is not a universal execution-price guarantee.
Can I calculate slippage for a trade that was skipped?
There is no fill to compare. Record the candidate decision and skip reason separately from filled requests, rejections and uncertain outcomes.
Official references
MetaTrader explains how trading requests are executed and lists broker-controlled parameters in the symbol specification. Match any log message to the execution mode and specification used by that symbol.