Detecting Market Structure with Swing Points, BOS, and CHOCH
Summary
This article explains how to turn price action market structure into an MQL5 indicator. It classifies bullish structure through successive higher highs and higher lows, bearish structure through lower highs and lower lows, and consolidation when these sequences are absent. Swing points are identified by comparing each candidate high or low with neighboring candles; relationships among recent swings inform the trend state. A close beyond an active swing level marks a structural break, labeled as a Break of Structure or Change of Character depending on context.
The implementation is organized around new-candle detection, swing validation, trend classification, break tracking, chart annotations, and a small dashboard. The article reports that the indicator compiled and was observed on a live chart, but gives no quantitative signal performance or trading test. Swing definitions depend on the selected neighboring-bar strength, and the discussion presents BOS and CHOCH as interpretive price-action cues rather than validated predictors.
Key ideas
- Market direction is represented through sequences of higher highs and higher lows or lower highs and lower lows.
- A swing point is detected by comparing a candle's high or low with neighboring bars on both sides.
- The indicator updates its structure calculations when a new candle forms.
- A close beyond an active swing level is used to identify a structural break and classify BOS or CHOCH.
- The article demonstrates compilation and chart display, but does not establish trading profitability.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.