OPEN-SOURCE SCRIPT
Sentiment Divergence Tracker

The "Sentiment Divergence Tracker" is a sophisticated quantitative analysis tool designed to identify statistical anomalies between two correlated financial assets. By monitoring the relative price movement of a primary asset against a correlated counterpart, this indicator highlights "Divergence Zones" that often precede significant market reversals or mean reversions.
Core Functionality:
Traditional technical analysis often ignores the relationship between inter-market assets. This indicator bridges that gap by normalizing percentage-based price fluctuations, allowing for a clean, comparative view of market sentiment.
Key Features:
Dynamic Divergence Calculation: Utilizes standard deviation and moving average models to calculate the "Fair Value" gap between two assets.
Automated Support/Resistance Mapping: Rather than manual drawing, the indicator plots dynamic support lines that adjust based on market volatility, helping traders identify institutional "value areas."
Oversold/Overbought Detection: Visualizes extreme deviations where the price has stretched too far from its correlated pair, signaling high-probability reversal setups.
Institutional Context: Useful for identifying liquidity pockets where "Smart Money" might be accumulating or distributing based on inter-market relationships.
How to Interpret:
Baseline (0.0): Represents the equilibrium point where both assets are moving in perfect correlation.
Divergence Line: The primary blue plot. When this line moves away from the baseline, it indicates a weakening correlation.
Support/Resistance Levels: These are not static lines but dynamic boundaries. A touch or breach of these levels typically indicates that the asset is statistically "oversold" or "overbought" relative to its pair.
Trade Execution: Look for "Mean Reversion" entries when the Divergence Line exhausts its momentum at the support/resistance boundaries and begins to curl back toward the baseline.
Recommended Settings:
Timeframe: Optimized for 15-minute to 4-hour charts for intraday and swing trading.
Correlated Pair Selection: Ensure the "Correlated Asset" input matches a highly correlated instrument (e.g., Gold/Silver, or major Currency/Index pairs).
Volatility Sensitivity: Adjust the lookback period in the settings to suit your specific asset's volatility profile.
Disclaimer:
This tool is intended for analytical purposes and does not constitute financial advice. Always integrate this indicator with your existing risk management strategy and technical confirmation (e.g., candlestick patterns, order blocks
Core Functionality:
Traditional technical analysis often ignores the relationship between inter-market assets. This indicator bridges that gap by normalizing percentage-based price fluctuations, allowing for a clean, comparative view of market sentiment.
Key Features:
Dynamic Divergence Calculation: Utilizes standard deviation and moving average models to calculate the "Fair Value" gap between two assets.
Automated Support/Resistance Mapping: Rather than manual drawing, the indicator plots dynamic support lines that adjust based on market volatility, helping traders identify institutional "value areas."
Oversold/Overbought Detection: Visualizes extreme deviations where the price has stretched too far from its correlated pair, signaling high-probability reversal setups.
Institutional Context: Useful for identifying liquidity pockets where "Smart Money" might be accumulating or distributing based on inter-market relationships.
How to Interpret:
Baseline (0.0): Represents the equilibrium point where both assets are moving in perfect correlation.
Divergence Line: The primary blue plot. When this line moves away from the baseline, it indicates a weakening correlation.
Support/Resistance Levels: These are not static lines but dynamic boundaries. A touch or breach of these levels typically indicates that the asset is statistically "oversold" or "overbought" relative to its pair.
Trade Execution: Look for "Mean Reversion" entries when the Divergence Line exhausts its momentum at the support/resistance boundaries and begins to curl back toward the baseline.
Recommended Settings:
Timeframe: Optimized for 15-minute to 4-hour charts for intraday and swing trading.
Correlated Pair Selection: Ensure the "Correlated Asset" input matches a highly correlated instrument (e.g., Gold/Silver, or major Currency/Index pairs).
Volatility Sensitivity: Adjust the lookback period in the settings to suit your specific asset's volatility profile.
Disclaimer:
This tool is intended for analytical purposes and does not constitute financial advice. Always integrate this indicator with your existing risk management strategy and technical confirmation (e.g., candlestick patterns, order blocks
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 cualquier republicación del código está sujeta a nuestras Normas internas.
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 u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga 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 cualquier republicación del código está sujeta a nuestras Normas internas.
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 u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.