Smart Market Structure and Swing Points
May 26, 2024

The Smart Market Structure and Swing Points indicator identifies key highs, lows, and trend breaks while integrating RSI values to help traders assess the strength of market reversals and structural shifts.
Usage
This script is designed to visualize the underlying framework of price action by marking market structure and specific swing levels. Traders can use it to identify:
- Market Structure: Automatically labels Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL) to define the prevailing trend.
- RSI Strength Validation: Labels include RSI values at key pivot points. Extreme RSI values suggest strong structural references, while middle-range values may indicate weaker structural points.
- Trend Transitions: Solid lines represent current trends, while dotted lines indicate historical structure. Dashed horizontal lines appear when a "Structure Break" occurs (e.g., price closing above a previous LH or below a previous HL).
- Swing Levels: The tool identifies and projects the most recent swing high and swing low levels, which are useful for setting stop losses or identifying immediate liquidity zones.
Details
The script uses a lookback-based logic to detect peaks and troughs. It calculates market structure based on a specified detection length, ensuring that a high or low is truly significant relative to its surroundings.
- Trend Logic: The indicator tracks the state of the trend (Up or Down) and updates its directional bias when price breaks established pivot points.
- Dynamic Visuals: It utilizes Average True Range (ATR) to offset labels, ensuring they remain visible and do not clutter the price action.
- Visual Continuity: The tool connects significant swing points with dynamic lines to provide a clean path of price movement.
Settings
Detection Settings
- Length for High/Low detection: Determines the number of bars used to confirm a pivot point. A higher value results in more significant but fewer structural points.
- Rsi length: Sets the lookback period for the RSI calculation used in the labels and strength assessment.
FAQ
How do I interpret the "HH" and "LL" labels?
"HH" stands for Higher High and "LL" for Lower Low. These indicate a trending market. When paired with the RSI values shown on the labels, you can determine if a move is reaching overbought or oversold conditions at the point of the structural break.
What do the dashed horizontal lines mean?
These lines represent "Structure Breaks." They appear when the market shifts its bias, such as when the price closes above the most recent Lower High, signaling a potential reversal into an uptrend.
How can I access Smart Market Structure and Swing Points?
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.