Name: Better RSI with Divergence and MA Version: v5 Description: This TradingView script extends the standard RSI (Relative Strength Index) by adding several useful features:
Basic RSI (14 periods) — the core indicator that shows overbought and oversold conditions in the market, with levels at 30, 50, and 70. Cycler Signals — visual representation of "bullish" and "bearish" cycles on the chart based on RSI values. Moving Averages (MA) Added — allows you to choose from different types of moving averages to smooth the RSI indicator: SMA, EMA, WMA, VWMA, SMMA (RMA), or Bollinger Bands. Bollinger Bands for RSI — use Bollinger Bands around the RSI to assess volatility. Divergences — signals for bullish and bearish divergences between price and the RSI: Bullish Divergence — when RSI makes higher lows while the price makes lower lows. Bearish Divergence — when RSI makes lower highs while the price makes higher highs. Gradient Backgrounds — visual indicators for overbought and oversold zones, using gradient colors from red to green. Settings Parameters:
RSI Period: The period for calculating RSI (default is 14). Source: The data source for the RSI calculation (default is close). MA Type: The type of moving average for the RSI (SMA, EMA, WMA, VWMA, SMMA, Bollinger Bands). MA Length: The length of the moving average (default is 14). BB StdDev: Standard deviation for Bollinger Bands (default is 2). Show Divergence: Whether to display divergence signals. Levels:
30 and 70: Overbought and oversold levels for RSI. 50: The central level for RSI. 20 and 80: Additional levels for analysis. Signal Types:
Cycler Signals: Color indication at the 50 level showing the current market cycle (bullish or bearish). Divergences: Bullish and bearish divergences are plotted with "Bull" and "Bear" labels on the chart.