All indicators

Market Structure Algo

Mar 25, 2024

Static chart image
Price Action BasedSupport and ResistanceSignalsChannelsVolatility

The Market Structure Algo indicator is a comprehensive technical analysis tool that identifies internal and external market trends by analyzing pivot points to provide real-time structural insights.

Usage

The Market Structure Algo can be used to identify trend shifts and potential areas of institutional interest. By categorizing structure into internal and external components, traders can assess both short-term momentum and long-term directional bias.

  • Market Structure Signals: The script generates visual labels on the chart. Upward arrows and triangles signify bullish breakouts (CHoCH or BOS) based on price action relative to internal pivots. Conversely, downward labels indicate bearish structural shifts.
  • Zone Identification: The tool plots dynamic support and resistance zones based on an ATR-adjusted distance from a moving average. These zones act as areas where price may find liquidity or rejection.
  • Bar Coloring: The chart bars are color-coded to reflect the current market structure score. Darker colors represent strong trend extremes, while lighter shades indicate secondary structural confirmations.
  • Exits: Gray triangle labels appear when price interactions suggest a weakening of the current internal structure, providing potential exit points for active trades.

Details

The script operates by calculating pivot highs and lows over two user-defined lookback periods: Internal and External.

  1. Internal MS: Focuses on short-term price swings to detect immediate shifts in trend (Change of Character).
  2. External MS: Analyzes longer-term pivot points to establish the broader market framework and major breakout levels (Break of Structure).
  3. Scoring Logic: The algorithm assigns a numerical score based on whether the market is making higher highs/lows or lower highs/lows relative to these pivots. This score determines the bar colors and signal logic.
  4. Dynamic Zones: The "Zone" feature uses a Simple Moving Average (SMA) combined with the Average True Range (ATR) to create a volatility-adjusted channel. This channel shifts position based on whether the market structure is currently bullish or bearish.

Settings

  • Internal MS: Sets the lookback period for detecting short-term pivot highs and lows.
  • External MS: Sets the lookback period for detecting long-term, significant market structure pivots.
  • Zone Distance: A multiplier for the ATR that determines how far the dynamic zones are plotted from the moving average.
  • Show Zone: A toggle to enable or disable the visualization of the SMA-based support/resistance bands.
  • Positive color: Customizes the color used for bullish signals, bars, and zones.
  • Negative color: Customizes the color used for bearish signals, bars, and zones.

FAQ

How do I interpret the different arrow/triangle signals?

Labels with arrows typically represent a Change of Character (CHoCH), indicating a potential reversal, while triangles represent a Break of Structure (BOS), indicating trend continuation.

Can I change the sensitivity of the structure detection?

Yes, by increasing the "Internal MS" or "External MS" values, you will filter out minor price fluctuations and focus on more significant market turns.

How can I access Market Structure Algo?

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.