OPEN-SOURCE SCRIPT
On Balance Volume W Divergence

OBV With Divergence Indicator
A comprehensive On Balance Volume (OBV) indicator enhanced with divergence detection capabilities.
Key Parameters:
Pine Script®
Alert System:
- Bullish divergence alerts
- Bearish divergence alerts
- Customizable alert messages
Note: The indicator requires volume data to function properly and will display an error if volume data is not available.
A comprehensive On Balance Volume (OBV) indicator enhanced with divergence detection capabilities.
- Core Features:Classic OBV calculation with volume-based price movement tracking
Advanced divergence detection system
Multiple smoothing options for OBV
Bollinger Bands integration - Technical Components:Volume-based price movement analysis
Pivot point detection for divergence
Customizable lookback periods
Adjustable divergence range parameters - Customization Options:
- Multiple Moving Average types (SMA, EMA, SMMA, WMA, VWMA)
- Bollinger Bands with adjustable standard deviation
- Divergence sensitivity settings
- Visual customization for signals and alerts
- Multiple Moving Average types (SMA, EMA, SMMA, WMA, VWMA)
The indicator combines traditional OBV analysis with modern divergence detection, offering traders a powerful tool for identifying potential trend reversals and market momentum shifts.
- Pivot Lookback Right/Left: 5 (default)
- Divergence Range: 5-60 bars
- MA Length: 14 (default)
- BB StdDev: 2.0 (default)
Alert System:
- Bullish divergence alerts
- Bearish divergence alerts
- Customizable alert messages
Note: The indicator requires volume data to function properly and will display an error if volume data is not available.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.