The Relative Strength Index (RSI) indicator in this script is an enhanced version of the traditional RSI, designed to provide traders with deeper insights into market momentum and potential price reversals. The RSI is calculated using the average of upward and downward price movements over a specified period (default is 14), yielding a value between 0 and 100. Key levels, such as 70 (overbought) and 30 (oversold), are highlighted to help identify potential turning points. To further improve visualization, the script adds background colors to different RSI zones: red for values below 40 (strongly bearish), orange for 40-50 (mild bearish), yellow for 50-60 (neutral), and green for values above 60 (bullish). This visual aid helps traders quickly assess market conditions at a glance. The script also introduces advanced features like divergence detection, allowing traders to identify potential trend reversals based on discrepancies between price and RSI movement. Bullish and bearish divergences are highlighted on the chart with corresponding labels for ease of identification. Additionally, it includes the option to apply moving averages (SMA, EMA, and others) or Bollinger Bands to the RSI for smoother trend analysis. Customizable settings for divergence detection, moving average types, and Bollinger Band parameters offer flexibility to adapt to different trading strategies, making this indicator a powerful tool for both novice and experienced traders.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.