RSI with Self-Adjusting Linear Regression Bands (Expo)
Sep 28, 2020

The RSI with Self-Adjusting Linear Regression Bands indicator integrates the Relative Strength Index with dynamic linear regression channels to create an adaptive oscillator that follows the prevailing trend. Unlike static boundaries, these self-adjusting bands act as evolving overbought and oversold thresholds that react to market volatility and momentum.
Usage
The indicator is designed to help traders identify trend reversals, pullbacks, and extreme market conditions.
- Overbought/Oversold Identification: When the RSI crosses above the upper linear regression band, the market may be reaching an overextended state relative to the current trend. Conversely, a drop below the lower band suggests an oversold condition.
- Trend Identification: The slope and position of the mid-curve indicate the short-term trend direction. RSI remaining above the mid-curve typically suggests bullish momentum, while remaining below suggests bearish momentum.
- Trend Pullbacks: In a strong trend, the RSI often returns to the mid-curve or the opposite band before resuming the primary direction. These touches can be interpreted as potential entry points for trend continuation.
Details
This tool is a modification and expansion of the "Linear Regression Trend bands" concept. It calculates a linear regression line based on the RSI values over a specific period rather than price. The script then applies standard deviation calculations to create bands that expand and contract based on the volatility of the RSI itself. The final output is smoothed using Weighted Moving Averages (WMA) to reduce noise and provide a clearer signal for technical analysis.
Settings
RSI Settings
- RSI Source: Determines the price data (e.g., Close, Open, High, Low) used to calculate the RSI.
- Length: Sets the lookback period for the RSI calculation.
Linear Regression Settings
- Period: The lookback window used to calculate the linear regression slope and intercept.
- Deviation: A multiplier for the standard deviation that determines the width of the upper and lower bands.
Overbought & Oversold Settings
- Overbought: Sets the static level for the overbought horizontal line (default 80).
- Oversold: Sets the static level for the oversold horizontal line (default 20).
FAQ
How do I use the self-adjusting bands compared to standard RSI levels?
While standard RSI levels (70/30) are fixed, the self-adjusting bands move with the trend. This helps prevent "false" overbought signals during strong uptrends where price continues to rise despite a high RSI reading.
What do the background highlights mean?
The script includes fills that highlight when the RSI value breaks outside of the linear regression bands, making it easier to spot potential exhaustion points visually.
How can I access this tool?
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.