OPEN-SOURCE SCRIPT

OBV with Divergence (SMA Smoother)

87
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.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.