Slippage is the difference between an explicitly chosen reference price and the actual execution price. It can worsen or improve a fill. To measure it consistently, record what your reference meant: the executable quote when the request was sent, a pending order's specified price or a planned stop level. A chart midpoint and an available Ask price are not the same reference.
All prices below are hypothetical. The Gold examples assume a linear contract of 100 troy ounces per lot, USD quotation and a USD account. They illustrate execution arithmetic, not current prices, broker performance or a guarantee about future fills.
Buy and sell directions matter
For a buy transaction, paying above the reference is adverse; paying below it is favorable. For a sell transaction, receiving below the reference is adverse; receiving above it is favorable. This applies to the transaction being executed: closing a long is a sell, and closing a short is a buy.
Consider a 0.10-lot Gold order. Its exposure is 0.10 × 100 = 10 ounces. A $0.40 price difference changes the gross cash result by $4. Use the actual contract and account currency rather than assuming every 0.10-lot order represents that exposure.
| Transaction | Actual fill | Effect versus reference |
|---|---|---|
| Buy | 3,000.40 | $4 worse |
| Buy | 2,999.60 | $4 better |
| Sell | 2,999.60 | $4 worse |
| Sell | 3,000.40 | $4 better |
Spread is a separate comparison
Spread is the difference between Bid and Ask at a moment in time. Suppose Gold is quoted Bid 2,999.80 and Ask 3,000.00. Buying at that Ask and immediately selling at the unchanged Bid costs $0.20 × 10 ounces = $2 before separate charges. Both transactions could be filled exactly at their quoted prices, with no slippage against those quotes.
If the requested buy referenced Ask 3,000.00 but was filled at 3,000.40, the extra $4 is adverse slippage against that reference. Keep the requested quote, actual fill and commission as separate records. When reconciling a trade from actual opening and closing fills, the spread effect is already inside their price difference; subtracting the same spread again would double-count it.
For a USD-quoted forex pair with a 100,000-unit contract, 0.10 lot represents 10,000 base-currency units. An adverse fill difference of 0.0002 therefore changes the USD gross result by $2 under these assumptions. Whether someone calls that difference two pips depends on the defined pip size; write the price difference explicitly.
Why a stop-loss estimate can be exceeded
Assume a 0.10-lot Gold buy opened at 3,000.00 with a stop at 2,990.00. An exact exit at the stop would lose $10 × 10 ounces = $100 before commission and financing. If the closing sell instead fills at 2,988.50, the loss is $11.50 × 10 = $115. The $15 difference is additional loss relative to the planned exit, not evidence that the position size changed.
A stop level and an executed deal serve different purposes. A price gap or fast move can leave the planned level unavailable for execution. Trigger rules, liquidity and the symbol's execution conditions affect the outcome. Do not use a stop price as a guarantee of the final account loss, especially when several EA orders or baskets are open.
A limit order expresses a price constraint but may not execute. An MT5 stop-limit order places a limit order after its trigger condition; it can remain unfilled while the market moves away. A price constraint trades away some execution certainty rather than eliminating market risk.
MT5 deviation is not a universal protection setting
The MQL5 trade-request deviation field is specified in points. It is not automatically a cash-loss limit or a Gold pip count. Confirm the symbol's point value and the EA's input definition before translating a number into a price distance.
MT5 supports different price-execution modes. Instant execution can involve acceptance of the requested price or a requote; market execution does not use the same price-negotiation process. The relevant request fields and broker rules differ. Setting a small deviation value does not establish that every market order or triggered stop must fill inside that distance.
An order rejected for price or volume reasons is not a successful fill with zero slippage. A strategy that repeatedly retries requests can change the eventual reference and exposure. Record rejected attempts and inspect the Experts and Journal logs instead of evaluating only the orders that happened to fill.
Review execution with a consistent log
- Record symbol, account type, order direction, volume, execution mode, request time and the executable quote used as reference.
- Compare actual deals with that reference. If an order has multiple fills, use their volumes when calculating an average fill and include every deal.
- Keep spread, commission and financing separately identifiable; avoid mixing their cash effects into an unexplained slippage number.
- Review quiet periods and stressed periods, including scheduled news, market reopenings and losing trades. A selected smooth sample is insufficient.
- Use demo testing to check settings and logging, while recognizing that a demo fill does not establish live execution quality.
Use tools without promising better fills
The Position Size Calculator can show how assumed entry-to-stop distance affects volume. It does not predict slippage or include charges automatically. Recalculate a hypothetical wider exit distance to understand sensitivity, then check permitted volume and combined account exposure separately.
A VPS or a closer server can reduce one source of delay. It cannot create liquidity, prevent a gap or guarantee how a broker executes an order. Changes to order size, trading windows or order type should be evaluated against your defined process rather than presented as a universal cure.
Common questions
- Is slippage always negative? No. A fill can be more favorable than the chosen reference; log both directions consistently.
- Does a wide spread prove slippage occurred? No. Compare the actual fill with the relevant executable quote or order level.
- Can I prove a broker's execution quality from one trade? One trade documents one event. It does not establish performance across different sizes, sessions and conditions.
- Does a profitable backtest already include live slippage? Only if the test models execution assumptions appropriately; historical profitability alone does not verify actual fills.