Skip to content
All library documents

Detecting Liquidity Sweeps with Confirmed Swing Levels

Article MQL5 code base

Summary

The indicator identifies confirmed fractal swing highs and lows, then checks later completed bars for wicks that pass beyond those levels and close back across them. A wick below a swing low followed by a close above it is marked as a potential bullish sweep; a wick above a swing high followed by a close below it is marked as bearish. Lines track unswept levels, while swept levels are visually marked and stop extending. Optional labels show the level price.

Inputs control swing confirmation width, the number of levels retained, minimum wick distance, whether a close back across the level is required, and whether a level can trigger repeatedly. Confirmation necessarily appears after bars form on both sides of a pivot, creating a delay that helps prevent repainting; sweep checks are made only after bar close. The document presents sweeps as observations for use alongside other confirmation, not standalone entry signals. It gives no performance testing or evidence that the pattern predicts subsequent price movement.

Key ideas

  • The detector marks swing highs and lows after neighboring bars confirm them as local extremes.
  • A sweep requires price to pierce a confirmed level by a minimum wick distance, with an optional close-back condition.
  • Bullish signals mark rejected moves below swing lows, while bearish signals mark rejected moves above swing highs.
  • Pivot confirmation is delayed by design, and checks on closed bars are intended to prevent repainting.
  • The author describes sweeps as contextual observations rather than automatic trade entries.

Tags

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