Skip to content
All library documents

Detecting Order Blocks After Confirmed Swing Breaks

Article MQL5 code base

Summary

The indicator identifies a potential order block by first confirming a fractal swing high or low, then waiting for a decisive close beyond that level with a sufficiently large candle body. It searches backward from the break for the last candle closing in the opposite direction; that candle’s range, or optionally just its body, defines the zone. A bullish zone follows an upward break, while a bearish zone follows a downward break.

Zones extend forward while unmitigated and freeze when price returns to them; users can treat a wick touch or a close inside the zone as mitigation. The document lists configurable thresholds for swing confirmation, break distance, impulse strength, search depth, zone size, and chart display. It describes a price-action tool rather than a tested trading strategy: no performance evidence is supplied, and the author notes that swing lookback affects the balance between significance and detection frequency. Signals are evaluated on closed bars, so they do not update mid-candle.

Key ideas

  • A swing point must be confirmed before a close beyond it can qualify as a structure break.\nThe break candle confirms the move, while the preceding opposing candle supplies the order-block zone.\nBullish and bearish zones represent potential support and resistance areas after breaks in opposite directions.\nZones can extend until price revisits them, with mitigation defined by a wick touch or a close inside the zone.\nSwing lookback settings affect detection frequency and the significance of identified levels.

Tags

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