Close-Only Market Structure
Nov 8, 2025

The Close-Only Market Structure indicator provides a simplified view of market trends by identifying structural swing points and breaks based exclusively on closing prices. By ignoring price wicks, the tool helps traders focus on price conviction and significant trend shifts without the noise of intraday volatility.
Usage
The tool is primarily used to identify the current structural phase of a market and detect trend continuations. Traders can use the displayed swing points and labels to determine if a market is in a state of expansion or consolidation.
- Swing Point Identification: The indicator marks Swing Highs (SH) and Swing Lows (SL) on the chart. These are confirmed once the price has moved a specific number of bars away from the peak/trough close.
- Trend Classification: Labels such as HH (Higher High), LL (Lower Low), LH (Lower High), and HL (Higher Low) appear at swing points to categorize the current trend state.
- Break of Structure (BOS): Triangle markers labeled "BOS" appear when the closing price successfully breaks above the previous Swing High or below the previous Swing Low, signaling a potential trend continuation.
- Visual Bias: The background color shifts to green during bullish structural phases and red during bearish phases, providing an immediate visual cue of the dominant market direction.
Details
The script utilizes the ta.pivothigh() and ta.pivotlow() functions applied to the close price series. By using closing prices rather than high/low values, the script focuses on "confirmed" price action where the market has sustained a level through the end of a session.
The structure is classified by comparing the most recent confirmed swing points against their predecessors. For instance, a "Strong Uptrend" (HH) is defined when both the new high and new low are higher than the previous ones. The indicator also tracks these levels using continuous stepped lines, which serve as dynamic support and resistance boundaries based on previous structural pivot closes.
Settings
- Pivot Lookback (L&R): Adjusts the sensitivity of swing point detection. A value of "1" identifies very minor fluctuations, while "5" focuses on more significant structural pivots.
- Show HH/HL/LH/LL labels on swings: Toggles the visibility of the structural classification labels (HH, HL, LH, LL) at the pivot points.
FAQ
How do I use the Close-Only Market Structure tool?
Apply the indicator to your chart and monitor the stepped lines for support and resistance. Look for "BOS" markers to identify moments where the market confirms a trend continuation by closing outside of previous structural boundaries.
What is the advantage of using closing prices for market structure?
Using closing prices filters out the noise generated by price wicks, which often represent temporary liquidity grabs or failed breakouts. This provides a clearer view of where the market "actually" trades and settles.
How can I access this 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.