RSI Market Structure
May 24, 2020

The RSI Market Structure indicator identifies and visualizes price swings based on Relative Strength Index (RSI) extremes to provide a clear view of market momentum and structural shifts.
Usage
The RSI Market Structure tool can be used to identify trend reversals and price cycles by connecting overbought and oversold conditions. When the RSI reaches an oversold level and subsequently moves toward an overbought level, the script draws a bullish swing line. Conversely, a bearish swing line is drawn when the RSI moves from overbought to oversold.
If the price continues to make new highs while in an overbought state (or new lows while in an oversold state), the swing lines and labels dynamically update to reflect the new price extreme. This allows traders to visualize the full extent of a price move relative to RSI cycles.
Details
The script functions by tracking the state of the RSI. It records the highest high reached during an overbought period and the lowest low reached during an oversold period. A "swing" is confirmed once the RSI transitions from one extreme threshold to the opposite.
The implementation ensures that the swing lines are always anchored to the absolute highest or lowest price points recorded during the respective RSI cycle. This methodology helps in filtering out minor price noise and focusing on significant market moves driven by momentum extremes.
Settings
- RSI Source: Determines the price data used to calculate the RSI (e.g., Close, Open, High, Low).
- RSI Length: The lookback period used for the RSI calculation.
- RSI Overbought: The threshold level (typically 70) above which the market is considered overbought.
- RSI Oversold: The threshold level (typically 30) below which the market is considered oversold.
FAQ
How do I access RSI Market Structure?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can the labels be hidden?
Yes, the labels marking the swing highs and lows can be toggled on or off within the indicator's Style settings menu.
Does the indicator repaint?
The indicator updates the current swing line dynamically as long as the RSI remains in an extreme state (Overbought or Oversold). Once the RSI moves to the opposite extreme, the previous swing is locked in place.
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.