ta.obvOn Balance Volume
On Balance Volume. Measures buying and selling pressure as a cumulative indicator that adds volume on up days and subtracts volume on down days.
Syntax
ta.obvReturns
series float
Code Examples
//@version=6
indicator("On Balance Volume")
plot(ta.obv, color=color.yellow)
// the same on pine
f_obv() =>
ta.cum(math.sign(ta.change(close)) * volume)
plot(f_obv())Trading Applications
Confirm price trends with volume pressure
Detect divergences for early reversal signals
Identify breakout confirmation with OBV trend
Use OBV slope for momentum analysis
Related Functions
Frequently Asked Questions
Generate ta.obv Code with AI
Draft Pine Script using ta.obv with Pineify's AI Coding Agent, then review the arguments and test the result on your chart. Usage depends on your plan and available credits.
Related Pine Script Functions
ta.pvt - Price-Volume Trend
Learn about ta.pvt built-in variable in Pine Script. Access Price-Volume Trend for percentage-weighted volume analysis.
ta.accdist - Accumulation/Distribution
Learn about ta.accdist built-in variable in Pine Script. Access the Accumulation/Distribution Index for money flow analysis.
ta.wad - Williams A/D
Learn about ta.wad built-in variable in Pine Script. Access Williams Accumulation/Distribution for true range volume analysis.
ta.mfi() - Money Flow Index
Learn how to use ta.mfi() in Pine Script. Syntax, parameters, code examples for the volume-weighted RSI indicator.
ta.wvad - Williams Variable A/D
Learn about ta.wvad built-in variable in Pine Script. Access Williams Variable Accumulation/Distribution.