Market Structure RSI
Apr 17, 2024

The Market Structure RSI indicator identifies potential trend reversals by integrating market structure dynamics—specifically higher highs and lower lows—into the classic Relative Strength Index calculation.
Usage
The indicator can be used to identify trend exhaustion and entry points based on the interaction between market structure and momentum. Traders typically monitor the following:
- Bullish Signals: Occur when the Market Structure RSI crosses above the oversold (OS) level. This suggests that the underlying structure is shifting from a bearish to a bullish bias.
- Bearish Signals: Occur when the Market Structure RSI crosses below the overbought (OB) level, indicating a potential shift from a bullish to a bearish bias.
- Trend Confirmation: The optional moving average can be enabled to smooth out the RSI line. Crossovers between the RSI and its MA can serve as secondary confirmation for trend direction or exit points.
- Contextual Analysis: This tool is most effective in trending environments. It is recommended to use these signals in conjunction with broader price action analysis and volume to filter out noise in ranging markets.
Details
Unlike a standard RSI that uses only price changes, this script tracks "unbroken" price pivots (higher highs and lower lows).
- Pivot Detection: The script identifies pivot highs and lows.
- Breakout Tracking: It monitors when current price action "breaks" these previous pivots based on the selected "Close Type" (either candle close or high/low).
- Accumulation: A running total of these structural breaks is maintained.
- RSI Application: The final RSI is calculated based on this cumulative market structure total rather than raw price, providing a momentum oscillator that reflects structural strength.
Settings
Market Structure RSI
- RSI Length: The lookback period used for the RSI calculation applied to the structure total.
- Overbought Level: The upper threshold (typically 80) where the RSI is considered overextended.
- Oversold Level: The lower threshold (typically 20) where the RSI is considered oversold.
- Close Type: Determines if a structure break is triggered by the candle "Close" or the "High/Low" of the wick.
Moving Average
- Show Moving Average: Toggles the visibility of the signal line.
- MA Type: Choose between EMA (Exponential), SMA (Simple), or WMA (Weighted) moving averages.
- MA Length: The lookback period for the selected moving average.
FAQ
How do I interpret the circle shapes on the RSI line?
The circles represent crossover signals. A green circle indicates the RSI has crossed above the oversold level, while a red circle indicates the RSI has crossed below the overbought level.
Can I change the sensitivity of the structure breaks?
Yes, by adjusting the "Close Type" setting to "High/Low," the script becomes more sensitive to price wicks, whereas "Close" requires a candle body to break a pivot level.
How do I access Market Structure RSI?
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.