On-balance volume oscillator

OBV Oscillator
Indicator

VolumeSeparate panelFree on ChartLabs

The OBV oscillator is on-balance volume minus a 20-bar average of that total. Columns are teal above zero and red below.

From Joseph Granville's on-balance volume, 1963. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AIOBV Oscillatorchartlabs.co/charts
Atlas reads it

OBV Osc is -5347.076.

OBV Osc -5347.076

Atlas reads it

OBV Osc is -5347.076.

OBV Osc -5347.076

Illustration on simulated data.

On-balance volume oscillatorWhat is the OBV Oscillator indicator?

On-balance volume adds this bar's volume when the close rises and subtracts it when the close falls. An unchanged close adds nothing. The oscillator is that running total minus an exponential average of the total. At the default length of 20, the weight on the new total is 2/21.

Record 0 starts the total and the average at 0, so the oscillator is 0. Closes of 10, 12 and 11 on volumes 100, 40 and 30 then print 0, about 36.190 and about 5.601. On the second bar the total is 40 and the average has only reached 80/21, so most of that 40 is still in the column.

Columns are #26a69a at or above zero and #ef5350 below. The panel prints 3 decimals. The source defaults to the close. A gap in the close or the volume leaves a gap, and the total waits for the next finite bar.

Not the OBV line

On-balance volume is the running total. This column is the total minus its average, so a rising total can still print red if it is under that average.

The seed

The average starts on the first total, which is 0. It does not wait 20 bars.

OBV Oscillator signalsFive patterns to know.

1Bullish lean

Teal column

The total is at or above its 20-bar average.

2Bearish lean

Red column

The total has fallen under its average.

3Inconclusive

Through zero

The total has just crossed its average. One bar is a cross, not a trend.

4Inconclusive

One tall column

A large volume bar moved the total far from the average. The next bars pull the average toward it.

5Inconclusive

Small columns

The total and its average are close. Volume is not pushing the total away.

OBV Oscillator formulaHow it is calculated.

OBVOsc=OBV−EMA(OBV,20)
STEP 1

Sign the volume

Add volume when the close rises, subtract it when the close falls, and add 0 when the close is unchanged. Record 0 is 0.

STEP 2

Average the total

Take an exponential average of that total, length 20, seeded with the first total.

STEP 3

Subtract

The column is the total minus the average. The example's second bar is 760/21, about 36.190, and it is teal because it is above zero.

OBV Oscillator settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
Periods201 to 5,000The length of the average of on-balance volume. The Signal lens changes this.
SourceCloseAny price, or volumeThe series whose rise or fall signs the volume. The default is the close.
Columns#26a69a at or above 0, #ef5350 belowFixedOne column series, 3 decimals, in its own panel.
Setting
Periods
Default
20
Range
1 to 5,000
What it changes
The length of the average of on-balance volume. The Signal lens changes this.
Setting
Source
Default
Close
Range
Any price, or volume
What it changes
The series whose rise or fall signs the volume. The default is the close.
Setting
Columns
Default
#26a69a at or above 0, #ef5350 below
Range
Fixed
What it changes
One column series, 3 decimals, in its own panel.
2022 bars in the average
70,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

OBV Oscillator strategiesUse it in 3 setups.

Teal while price rises

Whilethe columns aretealand the close is rising

The total is above its average and the closes have been higher. Traders often want that behind a breakout. It still only describes the volume total.

Red while price falls

Whilethe columns areredand the close is falling

The total is under its average. The columns do not say how far price will go.

A zero cross on its own

Ifone column crosses zerothenread the next few before treating it as a turn

The average is slow. One bar can poke across zero and come back.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

OBV Oscillator mistakesCommon mistakes.

Reading the column as the OBV total

A tall teal column means the total is far above its average. It is not the size of the total itself.

Expecting a blank chart for the first 20 bars

The average is seeded on record 0. The columns start immediately. They are not empty until the length fills.

Using a red column as a price target

Red means the total is under its average. It does not name a price.

OBV Oscillator combinationsPair it with these.

OBV Oscillator FAQQuestions traders ask.

What are the OBV oscillator settings?

Periods 20 and source close. The columns have no length of their own beyond that average.

What is the worked example?

Closes 10, 12 and 11 on volumes 100, 40 and 30. The columns are 0, about 36.190 and about 5.601.

Why is the second bar about 36.190?

The total becomes 40. The average, seeded at 0 with a weight of 2/21, moves to 80/21. 40 minus that is 760/21, which prints as 36.190 at 3 decimals.

When is a column red?

When the oscillator is below zero, colour #ef5350. At or above zero the column is #26a69a.

Is this the same as On Balance Volume?

No. On Balance Volume is the running total. This is that total minus a 20-bar exponential average of it.

Does the first bar wait for 20 closes?

No. Record 0 is 0, and later bars update at once. The length only sets how fast the average follows the total.

Does it repaint?

No. A closed bar's close and volume stay. The live bar can still change its close, so its sign can flip until it closes.

Who is it based on?

Joseph Granville's on-balance volume, in Granville's New Key to Stock Market Profits (1963). The oscillator is that total minus an average. Granville's book draws the total.

Related indicatorsMore volume tools.

All volume indicators

Try OBV Oscillator on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
OBV osc