All indicators

Smart Structure Breaks & Order Blocks

Sep 4, 2025

Static chart image
Price Action BasedSupport and ResistanceSignalsPivot Based (Retrospective)

The Smart Structure Breaks & Order Blocks indicator provides an automated framework for detecting market structure shifts and supply/demand zones through the identification of Break of Structure (BOS) events and order blocks (OB). By formalizing discretionary analysis, the tool helps traders identify consistent areas of interest based on swing high and low confirmations.

Usage

The Smart Structure Breaks & Order Blocks tool can be used to identify trend continuations and potential reversal zones. When the price breaks a prior swing high or low, the indicator labels a BOS and highlights the origin candle as an Order Block.

  • Trend Following: Traders can look for long entries when the price pulls back into a green bullish OB during an uptrend or short entries when the price rallies into a red bearish OB during a downtrend.
  • Mitigation Tracking: The tool tracks "tagged" zones, highlighting the border when price first enters the OB. The first touch (mitigation) is often considered the highest probability reaction point.
  • Invalidation: If the price closes through an order block, the zone changes color (e.g., a bull zone turns red), signaling a potential shift in market sentiment or a failed structure level.

Details

The script utilizes a specific logic sequence to ensure high-quality zone detection:

  1. Swing Detection: Uses pivot highs and lows to establish structural boundaries.
  2. BOS Logic: A Break of Structure is triggered when the price crosses or closes beyond the most recent confirmed swing level.
  3. OB Generation: Upon a BOS, the script identifies the "opposite" candle at the origin of the move. For a bullish BOS, it selects the previous bearish candle with the lowest low; for a bearish BOS, it selects the previous bullish candle with the highest high.
  4. Dynamic Management: Zones are managed through a ring buffer, ensuring only the most relevant recent zones are displayed to keep charts clean.

Settings

Detection Settings

  • Left/Right Pivot: Determines the number of bars required to confirm a swing point. Higher values result in more significant, macro structural levels.
  • Max Zones: Sets the maximum number of bullish and bearish zones stored on the chart simultaneously.
  • Zone Confirmation Lookback: A lookback period used to validate the origin candle of an order block.

Visualization & Filtering

  • Show Swing Points: Toggles the display of triangles above/below swing highs and lows.
  • Require close for BOS?: When enabled, price must close beyond a level to trigger a BOS. When disabled, a simple wick crossover is sufficient.
  • Use candle body for zones: If enabled, OB zones are drawn based on the candle body. If disabled, zones are drawn using the full wick range.

FAQ

How do I access Smart Structure Breaks & Order Blocks?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Why do some zones change color?

Zones change color when they are "invalidated," meaning the price has closed on the opposite side of the zone, suggesting the level no longer holds technical significance.

What is the difference between a "tagged" and "mitigated" zone?

In this script, "tagged" refers to the price physically touching the zone for the first time. This mitigation suggests that some of the limit orders within that block may have been filled.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.