All indicators

Higher Timeframe Market Structure

Jun 4, 2025

Static chart image
Price Action BasedSupport and ResistanceLiquidityPatterns

The Higher Timeframe Market Structure indicator is a comprehensive technical analysis tool designed to automatically identify and visualize market structure shifts, trend patterns, and supply/demand zones based on higher timeframe data. By aggregating price action, it helps traders maintain a birds-eye view of the market trend regardless of the current chart resolution.

Usage

The indicator can be used to identify key pivot points and institutional areas of interest. Traders typically use the Higher Timeframe Market Structure tool to:

  • Identify Trend Direction: Monitor Higher Highs (HH), Higher Lows (HL), Lower Lows (LL), and Lower Highs (LH) to determine the structural trend.
  • Spot Trend Reversals: Watch for "Internal Shifts" (triangular markers) which serve as early warnings for potential changes in market direction before a full Break of Structure (BOS) occurs.
  • Trade Supply & Demand: Utilize the automatically drawn boxes (Order Blocks). Green boxes represent Demand zones, while red boxes represent Supply zones. These are most effective when trading in the direction of the overall trend (e.g., buying in Demand zones during a bullish trend).
  • Visualize Market Rhythm: Use the ZigZag lines to filter out price noise and focus on the significant swings in price action.

Details

The script operates by requesting data from a user-defined higher timeframe (HTF). It calculates internal structure shifts based on either candle opens or high/low breaches, depending on the selected mode. Order blocks are generated when a significant break of structure is detected, marking the origin of the move. The indicator includes built-in mitigation logic that can either dim or completely remove supply and demand zones once price has revisited them, ensuring the chart remains clean and focused on fresh liquidity areas.

Settings

  • HTF for SMA Structure: Sets the higher timeframe used for structure and zone calculations.
  • Use Safe History Offset Limit: A performance setting to prevent buffer errors by capping how far back the script looks for historical data.
  • Show Bullish/Bearish Order Blocks: Toggles the visibility of supply and demand zones.
  • Order Block Duration: Determines how many bars the order block boxes extend into the future.
  • Delete Mitigated Boxes: If enabled, boxes disappear once price enters the zone; otherwise, they are faded out.
  • Calculate Internal Shift By: Choose between "Open" or "High/Low" logic to determine what constitutes a structural shift.
  • ZigZag Customization: Adjust the width and style (Solid, Dotted, Dashed) of the trend-connecting lines.

FAQ

How do I interpret the internal shift markers? Upward triangles indicate a bullish internal shift, suggesting a potential move higher, while downward triangles indicate a bearish internal shift.

What is the difference between BOS and an Internal Shift? An internal shift is a minor structural change within a larger move, whereas a Break of Structure (BOS) represents a breach of a major swing high or low.

How do I access the Higher Timeframe Market Structure indicator? 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.