Skip to content
All library documents

Monitoring Spread Spikes to Filter Risky Trading Conditions

Article MQL5 code base

Summary

The dashboard tracks live bid–ask spread alongside the minimum, maximum, and average spread over a rolling window. It changes its visual warning state when a selected condition is met, helping traders spot spread expansion around news, session transitions, rollovers, or thin markets. The proposed uses include delaying entries, reducing position size, widening stops, or avoiding a trade when transaction conditions deteriorate.

Warnings can be based on the current spread exceeding a multiple of its recent average or crossing a fixed threshold, including per-symbol limits. Readings can be shown as price differences, percentages, pips, or raw points, and optional alerts can include a cooldown. The dashboard samples spread over a configurable window and includes settings to control update frequency. It measures quoted spread only: it does not directly measure slippage, market depth, or execution quality. Readings also depend on the broker feed and instrument specifications, so thresholds need market-specific calibration. The document offers design and usage guidance but no empirical evidence that the filter improves trading results.

Key ideas

  • The dashboard summarizes current and recent bid–ask spread conditions on a rolling basis.
  • Warnings can use a multiple of recent average spread or a fixed instrument-specific threshold.
  • Spread alerts can inform decisions to wait, reduce exposure, adjust stops, or skip entries.
  • The indicator does not directly capture slippage or execution quality, and readings depend on the data feed.
  • Thresholds should be calibrated to the symbol and its normal spread behavior.

Tags

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