OPEN-SOURCE SCRIPT
Gabriel's Dynamic Sentiment RSI

📊 Dynamic Sentiment RSI with Velocity, Acceleration & Divergence Detection
Created by GabrielAmadeusLau
This advanced Pine Script indicator fuses multiple layers of market insight into a unified momentum and sentiment tool. It is designed to extract nuanced sentiment signals from price action using a hybridized RSI model enhanced with stochastic dynamics, volatility weighting, and divergence tracking. It adapts to a wide range of asset classes including equities, crypto, gold, and forex.
🔍 Core Components
✅ 1. Dynamic Sentiment RSI
A normalized, stochastic-based RSI that adjusts its sensitivity using the Sentiment Factor.
Smoothed using a Jurik Moving Average for precision noise filtering.
Weighted using volume, volatility (VIX-like), HL extremes, and trend-based adaptive weighting, giving it a powerful multi-dimensional response.
✅ 2. Hann-Window RSI Calculation
Leverages a Hann Window and Levy Flight transformation to amplify cyclical behavior in RSI inputs.
Applies power-based weighting to directional movement, ideal for assets with cyclic or fractal-like structure.
✅ 3. Velocity & Acceleration Engine
Measures the rate of RSI change over a customizable period, and then the rate of that rate (acceleration).
Both are plotted with adaptive coloring to visually represent momentum shifts.
This dynamic structure aids in anticipating breakout strength or exhaustion.
✅ 4. Sentiment Heat Background
Background shading reflects bullish (teal) or bearish (silver) sentiment using smoothed stochastic RSI outputs.
Creates an intuitive market "mood" indicator for quick-glance visual analysis.
🔁 Smoothing & Weighting Customizations
You can toggle between different weighting modes:
Volume Weighted: Uses volume or ATR if unavailable.
VIX Weighted: Incorporates a volatility-based weight via a WVF-like formula.
HL Weighted: High-Low range smoothed.
Linear Weighted: Applies linear regression to the signal.
Trend Adaptive: Squares rolling maximums/minimums for dynamic strength adaptation.
🔎 Divergence Detection System
Supports Regular & Hidden Divergence using any of the following pivots:
Raw RSI
Smoothed K% RSI
Sentiment RSI
Velocity
Acceleration
Allows divergence tracking on custom timeframes and Heikin Ashi data.
Custom line styles, colors, and optional “last signal only” visibility.
Alerts are provided for all four divergence types.
📌 Built-in Alerts
✅ Bullish/Bearish Regular Divergence
✅ Bullish/Bearish Hidden Divergence
✅ General Divergence Summary Alerts
⚙️ Highly Configurable Settings
Sentiment Factor scaling (default ~2.2)
Levy exponent (ideal between 0.4 to 3.2 depending on asset class)
Velocity & Acceleration scaling inputs
Pivot lookback controls
Toggle smoothing methods and weighting logic
🧠 Ideal Use Cases
Swing and Trend Trading: The dynamic structure identifies both trend continuations and reversals with precision.
Divergence Confirmation: Confirm entries or exits using regular/hidden divergence alongside acceleration/velocity overlays.
Adaptive Strategy Building: Integrate this tool as a sentiment engine for algorithmic trading strategies.
🔬 Recommended Settings by Asset Class
Asset Type Levy Sentiment Factor
Crypto 0.6–1.2 2.0–2.5
Gold 0.4–1.0 2.0–2.2
Stocks 0.9–1.2 2.2–2.5
Forex 2.5–3.2 1.8–2.3
*A sentiment Factor of 9.5 can tell the larger trend apart on Daily and up.*
🧩 Technical Notes
Uses Jurik MA (Power 2, Phase 50) for minimal lag smoothing.
Employs Chebyshev filters (pre-Stochastic) for advanced sentiment smoothing.
Weighted RSI is normalized from -100 to 100, with color-coded velocity and acceleration histograms.
Created by GabrielAmadeusLau
This advanced Pine Script indicator fuses multiple layers of market insight into a unified momentum and sentiment tool. It is designed to extract nuanced sentiment signals from price action using a hybridized RSI model enhanced with stochastic dynamics, volatility weighting, and divergence tracking. It adapts to a wide range of asset classes including equities, crypto, gold, and forex.
🔍 Core Components
✅ 1. Dynamic Sentiment RSI
A normalized, stochastic-based RSI that adjusts its sensitivity using the Sentiment Factor.
Smoothed using a Jurik Moving Average for precision noise filtering.
Weighted using volume, volatility (VIX-like), HL extremes, and trend-based adaptive weighting, giving it a powerful multi-dimensional response.
✅ 2. Hann-Window RSI Calculation
Leverages a Hann Window and Levy Flight transformation to amplify cyclical behavior in RSI inputs.
Applies power-based weighting to directional movement, ideal for assets with cyclic or fractal-like structure.
✅ 3. Velocity & Acceleration Engine
Measures the rate of RSI change over a customizable period, and then the rate of that rate (acceleration).
Both are plotted with adaptive coloring to visually represent momentum shifts.
This dynamic structure aids in anticipating breakout strength or exhaustion.
✅ 4. Sentiment Heat Background
Background shading reflects bullish (teal) or bearish (silver) sentiment using smoothed stochastic RSI outputs.
Creates an intuitive market "mood" indicator for quick-glance visual analysis.
🔁 Smoothing & Weighting Customizations
You can toggle between different weighting modes:
Volume Weighted: Uses volume or ATR if unavailable.
VIX Weighted: Incorporates a volatility-based weight via a WVF-like formula.
HL Weighted: High-Low range smoothed.
Linear Weighted: Applies linear regression to the signal.
Trend Adaptive: Squares rolling maximums/minimums for dynamic strength adaptation.
🔎 Divergence Detection System
Supports Regular & Hidden Divergence using any of the following pivots:
Raw RSI
Smoothed K% RSI
Sentiment RSI
Velocity
Acceleration
Allows divergence tracking on custom timeframes and Heikin Ashi data.
Custom line styles, colors, and optional “last signal only” visibility.
Alerts are provided for all four divergence types.
📌 Built-in Alerts
✅ Bullish/Bearish Regular Divergence
✅ Bullish/Bearish Hidden Divergence
✅ General Divergence Summary Alerts
⚙️ Highly Configurable Settings
Sentiment Factor scaling (default ~2.2)
Levy exponent (ideal between 0.4 to 3.2 depending on asset class)
Velocity & Acceleration scaling inputs
Pivot lookback controls
Toggle smoothing methods and weighting logic
🧠 Ideal Use Cases
Swing and Trend Trading: The dynamic structure identifies both trend continuations and reversals with precision.
Divergence Confirmation: Confirm entries or exits using regular/hidden divergence alongside acceleration/velocity overlays.
Adaptive Strategy Building: Integrate this tool as a sentiment engine for algorithmic trading strategies.
🔬 Recommended Settings by Asset Class
Asset Type Levy Sentiment Factor
Crypto 0.6–1.2 2.0–2.5
Gold 0.4–1.0 2.0–2.2
Stocks 0.9–1.2 2.2–2.5
Forex 2.5–3.2 1.8–2.3
*A sentiment Factor of 9.5 can tell the larger trend apart on Daily and up.*
🧩 Technical Notes
Uses Jurik MA (Power 2, Phase 50) for minimal lag smoothing.
Employs Chebyshev filters (pre-Stochastic) for advanced sentiment smoothing.
Weighted RSI is normalized from -100 to 100, with color-coded velocity and acceleration histograms.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Gabriel Amadeus
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Gabriel Amadeus
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.