The Liquidity Sweep on Break of Structure (BoS) is a price action strategy that combines trend identification through swing points with the detection of manipulative sweeps beyond those points to capture liquidity before a reversal. We scan surrounding bars to find swing highs (higher than left/right neighbors) and lows (lower), labeling them relative to priors: HH (higher high) or LH (lower high) for highs, HL (higher low) or LL (lower low) for lows. BOS occurs on HH in uptrends (bullish continuation) or LL in downtrends (bearish), signaling structure break; a sweep happens when price wicks beyond the swing (SSL below low in uptrend, BSL above high in downtrend) but closes inside on a directional candle, indicating trap of stops before true move.
Our plan is to detect swings over input length, label HH/HL/LH/LL to set BOS trend, spot sweeps on BOS with wick beyond swing and close inside directional candle, trade buys on SSL in bullish BOS or sells on BSL in bearish with dynamic trade levels, maximum trades limit, close opposites, and visualize with icons/labels on swings, rectangles on sweeps, dashed lines on BOS breaks, arrows on entries, plus dynamic fonts on scale changes. Liquidity sweep can be on any setup; we just chose the break of structure strategy because it is straightforward, but it can be switched for any other setup, like imbalance setups. In brief, here is a visual representation of our objectives.
Automating Trading Strategies in MQL5 (Part 46): Liquidity Sweep on Break of Structure (BoS) - MQL5 Articles https://share.google/XNvbkQvKQpJxMGcq4