Overview: This indicator analyzes the Relative Strength Index (RSI) over 252 days, calculating its mean (average) and standard deviation. Based on this, it sets an upper and lower threshold to determine overbought and oversold conditions. Additionally, it calculates the correlation between RSI and price using a moving average, helping traders understand if RSI is moving in sync with price trends. Key Features: ✅ RSI Deviation Bands
Plots RSI (blue), Upper Band (red), Lower Band (green) Plots RSI-Price Correlation (orange) Buy/Sell signals appear on chart
TradingView Indicator: RSI Deviation & Correlation Indicator Overview: This indicator analyzes the Relative Strength Index (RSI) over 252 days, calculating its mean (average) and standard deviation. Based on this, it sets an upper and lower threshold to determine overbought and oversold conditions. Additionally, it calculates the correlation between RSI and price using a moving average, helping traders understand if RSI is moving in sync with price trends.
// Plot Correlation Moving Average plot(rsi_price_correlation, title="RSI-Price Correlation", color=color.orange, linewidth=2)
// Alerts for Buy/Sell alertcondition(buy_signal, title="BUY Alert", message="RSI is below the Lower Limit - BUY Signal") alertcondition(sell_signal, title="SELL Alert", message="RSI is above the Upper Limit - SELL Signal") How to Use in TradingView: 1️⃣ Open TradingView and go to the Pine Editor 2️⃣ Paste the above Pine Script 3️⃣ Click Add to Chart 4️⃣ Adjust RSI Length and Correlation Period if needed 5️⃣ Buy/Sell alerts will trigger when conditions match
Trading Strategy: 📉 Sell (Short Entry) when RSI crosses above the upper limit 📈 Buy (Long Entry) when RSI drops below the lower limit 📊 Confirm trends with RSI-Price Correlation:
+1 means RSI and price are moving together -1 means RSI and price are diverging Final Notes: Works best on higher timeframes (Daily, Weekly) Helps filter overbought/oversold false signals Can be combined with other indicators (MACD, Bollinger Bands, etc.)