All indicators

Market structure

Nov 10, 2024

Static chart image
Support and ResistanceLiquidityPatternsPivot Based (Retrospective)

The Market structure indicator is a comprehensive technical analysis tool designed to automatically identify and visualize internal and swing market structures using pivot points. It helps traders distinguish between short-term price fluctuations and long-term trend shifts by highlighting key structural breaks and liquidity areas.

Usage

The indicator can be used to track market trends on two distinct levels: Internal and Swing.

  • Internal Structure: Uses shorter pivot lengths (default 5) to identify minor trends, shown with dashed lines.
  • Swing Structure: Uses longer pivot lengths (default 50) to identify major trends, shown with solid lines.

The script identifies three primary structural events:

  • Break of Structure (BOS): Occurs when the price continues in the direction of the current trend by breaking a previous high or low.
  • Change of Character (CHoCH): Occurs when the price breaks the opposite structural pivot, signaling a potential trend reversal.
  • Equal Highs/Lows (EQH/EQL): Identifies potential liquidity zones where price has reached a similar level multiple times without breaking.

Traders can use the "Current" range feature to see the active trading zone between the latest high and low pivots. Additionally, the liquidity feature ($$$) monitors when price sweeps these structural levels.

Details

The script functions by identifying pivot points (Higher Highs, Higher Lows, Lower Highs, Lower Lows) based on user-defined lookback lengths. It maintains a memory of the latest 5 pivots within the current trend to determine structural breaks. A BOS is automatically updated or removed if an earlier pivot within the same trend is broken, ensuring the most relevant structural levels are displayed. Equal High/Low zones are calculated using a percentage factor of the Average True Range (ATR 14), allowing for a margin of error when identifying "equal" price levels.

Settings

Internal/Swing Structure Groups

  • Enable: Toggles the visibility of the specific market structure level.
  • Pivot: Sets the length used to calculate high/low pivot points.
  • Show Pivots: Toggles the display of labels (HH, HL, LH, LL).
  • Break of Structure (BOS): Enables the detection and display of trend continuation breaks.
  • Equal high/low (EQH/EQL): Enables detection of liquidity zones where price levels are nearly identical.
  • Factor: The percentage of ATR used to determine if two price points are "equal."
  • Extend equal high/low zones: Extends the EQH/EQL zones to the right for easier visualization of future tests.

Display & Price Action

  • Structure/Liquidity Font Size: Adjusts the size of the text labels on the chart.
  • Liquidity ($$$): Toggles the identification of liquidity sweeps based on bar closes above or below structural levels.
  • Lookback: Sets how many pivots back the script checks for liquidation events.

Statistics & Screener

  • Year: Defines the number of years for historical statistics on CHoCH and BOS counts.
  • Keep: Determines how many bars a structural change remains active in the background for screening or alerting purposes.

FAQ

  • How can I differentiate between a trend continuation and a reversal? The indicator labels trend continuations as "BOS" and trend reversals as "CHoCH."
  • Can I get alerts for trend changes? Yes, the script includes built-in alert configurations for CHoCH, BOS, and Equal High/Low events.
  • How do I access this tool? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

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.