OPEN-SOURCE SCRIPT
Actualizado RSI: chart overlay

This indicator maps RSI thresholds directly onto price. Since the EMA of price aligns with RSI’s 50-line, it draws a volatility-based band around the EMA to reveal levels such as 70 and 30.
By converting RSI values into visible price bands, the overlay lets you see exactly where price would have to move to hit traditional RSI boundaries. These bands adapt in real time to both price movement and market volatility, keeping the classic RSI logic intact while presenting it in the context of price action. This approach helps traders interpret RSI signals without leaving the main chart window.
The calculation uses the same components as the RSI: alternative derivation script: Wilder’s EMA for smoothing, a volatility-based unit for scaling, and a normalization factor. The result is a dynamic band structure on the chart, representing RSI boundary levels in actual price terms.
Key components and calculation breakdown:
- Wilder’s EMA
Used as the anchor point for measuring price position.Pine Script® myEMA = ta.rma(close, Length) - Volatility Unit
Derived from the EMA of absolute close-to-close price changes.Pine Script® CC_vol = ta.rma(math.abs(close - close[1]), Length) - Normalization Factor
Scales the volatility unit to align with the RSI formula’s structure.Pine Script® normalization_factor = 1 / (Length - 1) - Upper and Lower Boundaries
Defines price bands corresponding to selected RSI threshold values.Pine Script® up_b = myEMA + ((upper - 50) / 50) * (CC_vol / normalization_factor) down_b = myEMA - ((50 - lower) / 50) * (CC_vol / normalization_factor) - Inputs
- RSI length
- Upper boundary – RSI level above 50
- Lower boundary – RSI level below 50
- ON/OFF toggle for 50-point line (EMA of close prices)
- ON/OFF toggle for overbought/oversold coloring (use with line chart)
- RSI length
Interpretation:
- Each band on the chart represents a chosen RSI level.
- When price touches a band, RSI is at that threshold.
- The distance between moving average and bands adjusts automatically with volatility and your selected RSI length.
- All calculations remain fully consistent with standard RSI values.
Feedback and code suggestions are welcome, especially regarding implementation efficiency and customization.
Notas de prensa
Release Notes:- Added color pickers for Upper/Lower band, and 50-Point EMA lines.
- Added Gradient On/Off option for overbought / oversold fills.
- Cleaner Inputs groups.
- Fixed typos, improved comments and code readability.
- RSI math unchanged; only visual/UI improvements.
Notas de prensa
- Minor formatting and structural improvements for clarity, readability, and easier maintenance.
- Added the max_width variable and renamed several intermediate variables for consistency across the adaptive RSI indicator family.
This updates steps 3 and 4 from the original calculation framework.
New calculation:
- Wilder’s EMA
Used as the anchor point for measuring price position.Pine Script® myEMA = ta.rma(close, Length) - Volatility Unit
Derived from the EMA of absolute close-to-close price changes.Pine Script® CC_vol = ta.rma(math.abs(close - close[1]), Length) - Normalization Factor
Scales the volatility unit to align with the RSI formula’s structure.Pine Script® normalization_factor = (Length – 1) - Max Width
Represents the maximum mathematically valid channel width around price.Pine Script® max_width = CC_vol * normalization_factor - Upper and Lower Boundaries
Defines price bands corresponding to selected RSI threshold values.Pine Script® up_b = myEMA + (upper - 50) / 50 * max_width down_b = myEMA - (50 - lower) / 50 * max_width
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
The 31-page "RSI Manifesto" — free download:
adaptiversi.gumroad.com/l/evrgfw
Video tutorials:
youtube.com/@adaptiveRSI
adaptiversi.gumroad.com/l/evrgfw
Video tutorials:
youtube.com/@adaptiveRSI
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
The 31-page "RSI Manifesto" — free download:
adaptiversi.gumroad.com/l/evrgfw
Video tutorials:
youtube.com/@adaptiveRSI
adaptiversi.gumroad.com/l/evrgfw
Video tutorials:
youtube.com/@adaptiveRSI
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.