Skip to content
All library documents

Measuring Live Trading Execution Costs and Slippage

Article MQL5 articles

Summary

This article presents a MetaTrader diagnostic for comparing live execution with backtest assumptions. It measures quoted spread, fill deviation, latency, and selected order return codes. A manual probe mode submits a round-trip trade and compares each fill with the quote recorded before sending; a passive mode estimates deviations for account deals using the quote available when the transaction event is handled. Entry and exit samples are kept separate to reveal asymmetric costs, and results can be written to CSV.

The article emphasizes that the two modes have different precision: passive measurements may diverge from the actual execution-time quote, while requote and price-change counts apply only to the tool's own probes. Samples are deal-based, and measurements reflect the full terminal, network, broker, and liquidity path rather than the broker alone. Probe trades incur real costs, so the article recommends a demo account or minimum lot. The tool diagnoses execution; it does not test a strategy or provide tick-level server analysis.

Key ideas

  • A manual round-trip probe estimates request-to-fill slippage and latency for the tool's own trades.
  • Passive fill comparisons are approximate because the quote is read after the trade event arrives.
  • Separate entry and exit measurements can reveal asymmetric execution costs.
  • The monitor measures the full execution path, and its samples are deal-based rather than reconstructed orders.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.