RSI Swing Structure Indicator (HH, LH, HL, LL + Alerts)
May 2, 2026

The RSI Swing Structure Indicator (HH, LH, HL, LL + Alerts) tool visualizes market structure by identifying swing points based on RSI momentum extremes to help traders track trend direction and reversals.
Usage
The tool identifies Higher Highs (HH), Lower Highs (LH), Higher Lows (HL), and Lower Lows (LL) directly on the price chart. When the RSI enters the overbought zone, the script begins tracking a potential swing high; when it enters the oversold zone, it tracks a potential swing low.
Examples of usage include:
- Trend Identification: A sequence of HHs and HLs indicates an uptrend, while LLs and LHs indicate a downtrend.
- Reversal Detection: A break in the structure (e.g., a LH followed by a LL in an uptrend) can signal a potential shift in market sentiment.
- Entry Confirmation: Traders can use the labels to confirm pullbacks (HL in an uptrend) for long entries.
Details
The indicator relies on the Relative Strength Index (RSI) to define "momentum extremes." Unlike standard price-action zig-zags that use fixed percentages or bar counts, this script waits for the RSI to reach user-defined overbought or oversold thresholds.
- Dynamic Updates: While the RSI remains in an extreme zone, the swing point continues to update if price makes a new high/low.
- Confirmation: A swing is "confirmed" once the RSI moves into the opposite zone, ensuring that the detected structure is backed by a significant shift in momentum.
Settings
- RSI Source: Determines the price data used to calculate the RSI (default is Close).
- RSI Length: The lookback period for the RSI calculation. Lower values make the indicator more sensitive.
- RSI Overbought: The threshold (e.g., 70) above which the script looks for swing highs.
- RSI Oversold: The threshold (e.g., 30) below which the script looks for swing lows.
- Show Labels: Toggles the visibility of the HH, LH, HL, and LL text labels.
- Show Swing Lines: Toggles the drawing of lines connecting the identified swing points.
FAQ
How do I access the RSI Swing Structure Indicator (HH, LH, HL, LL + Alerts)?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I use this for intraday trading?
Yes, the indicator works on all timeframes. However, using it on higher timeframes (1H+) often results in more reliable structure identification by filtering out market noise.
What do the "Swing Lines" represent?
The lines connect the confirmed swing highs and lows, providing a visual representation of the market's current trajectory and "zig-zag" pattern based on momentum extremes.
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.