OPEN-SOURCE SCRIPT
OBV with Divergence (SMA Smoother)

Title: OBV Divergence with SMA Smoothing
Description:
This indicator is a powerful tool designed to identify regular (reversal) and hidden (continuation) On-Balance Volume (OBV) divergences against price action. It uses a modified OBV calculation (an OBV Oscillator) and integrates pivot analysis to automatically highlight potential turning points or trend continuations directly on your chart.
Key Features
Advanced Divergence Detection: Automatically detects and labels four types of divergences:
Regular Bullish/Bearish: Signals potential trend reversals.
Regular Bullish: Price makes a Lower Low (LL) but the OBV Oscillator makes a Higher Low (HL).
Regular Bearish: Price makes a Higher High (HH) but the OBV Oscillator makes a Lower High (LH).
Hidden Bullish/Bearish: Signals potential trend continuations.
Hidden Bullish: Price makes a Higher Low (HL) but the OBV Oscillator makes a Lower Low (LL).
Hidden Bearish: Price makes a Lower High (LH) but the OBV Oscillator makes a Higher High (HH).
OBV Oscillator: Instead of plotting the raw OBV, this script uses the difference between the OBV and its Exponential Moving Average (EMA). This technique centers the indicator around zero, making it easier to visualize volume momentum shifts and clearly identify peaks and troughs for divergence analysis.
Optional SMA Smoothing Line (New Feature): An added Simple Moving Average (SMA) line can be toggled on to further smooth the OBV Oscillator. Traders can use this line for crossover signals or to confirm the underlying trend of the volume momentum, reducing whipsaws.
Customizable Lookback: The indicator allows you to define the lookback periods (Pivot Lookback Left/Right) for price and oscillator pivots, giving you precise control over sensitivity. The Max/Min of Lookback Range helps filter out divergences that are too close or too far apart.
Description:
This indicator is a powerful tool designed to identify regular (reversal) and hidden (continuation) On-Balance Volume (OBV) divergences against price action. It uses a modified OBV calculation (an OBV Oscillator) and integrates pivot analysis to automatically highlight potential turning points or trend continuations directly on your chart.
Key Features
Advanced Divergence Detection: Automatically detects and labels four types of divergences:
Regular Bullish/Bearish: Signals potential trend reversals.
Regular Bullish: Price makes a Lower Low (LL) but the OBV Oscillator makes a Higher Low (HL).
Regular Bearish: Price makes a Higher High (HH) but the OBV Oscillator makes a Lower High (LH).
Hidden Bullish/Bearish: Signals potential trend continuations.
Hidden Bullish: Price makes a Higher Low (HL) but the OBV Oscillator makes a Lower Low (LL).
Hidden Bearish: Price makes a Lower High (LH) but the OBV Oscillator makes a Higher High (HH).
OBV Oscillator: Instead of plotting the raw OBV, this script uses the difference between the OBV and its Exponential Moving Average (EMA). This technique centers the indicator around zero, making it easier to visualize volume momentum shifts and clearly identify peaks and troughs for divergence analysis.
Optional SMA Smoothing Line (New Feature): An added Simple Moving Average (SMA) line can be toggled on to further smooth the OBV Oscillator. Traders can use this line for crossover signals or to confirm the underlying trend of the volume momentum, reducing whipsaws.
Customizable Lookback: The indicator allows you to define the lookback periods (Pivot Lookback Left/Right) for price and oscillator pivots, giving you precise control over sensitivity. The Max/Min of Lookback Range helps filter out divergences that are too close or too far apart.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.