Obv Trend (Momentum)

Granville's On-Balance Volume: adds each bar's volume on an up close and subtracts it on a down close, then buys when that running total crosses above its own 20-bar average and sells when it crosses back below.

How It Works

  1. Keep a running total of volume: add the whole bar's volume when it closes up, subtract it when it closes down. That total is On-Balance Volume.
  2. Buy when OBV crosses above its own 20-bar average — buying volume is accumulating faster than it has been recently, which Granville argued tends to lead price.
  3. Sell when OBV falls back below that average. The comparison is against its own average rather than a fixed level because OBV's raw value depends entirely on where the count began.

Worked example. OBV has been drifting near its 20-bar average when three heavy up days add 2,400 units and lift it clearly above — the strategy buys, even though price has barely moved. Price follows over the next fortnight, and the position is closed when a run of heavy down bars drags OBV back beneath its average.

The Math Behind The Indicators

Everything runs on closing prices of the traded timeframe: P is a close, Pt today's close, and N counts bars — one bar is one candle of that timeframe, so 20 bars on a 1h chart is 20 hours.

On-Balance Volume (OBV)
A running tally of volume signed by direction: the bar's entire volume is added when it closes up and subtracted when it closes down. The premise is that turnover reveals conviction — a rally on heavy volume is being accumulated, the same rally on thin volume is not. Only the sign of the price change matters, never its size, so one huge quiet bar counts for less than a small busy one. The absolute level is meaningless (it depends on where the count started); only its direction carries information.
\[\mathrm{OBV}_t = \mathrm{OBV}_{t-1} + \begin{cases} V_t & P_t > P_{t-1} \\ -V_t & P_t < P_{t-1} \\ 0 & \text{otherwise} \end{cases}\]
Example: Starting from 0, an up bar on 500 units of volume takes OBV to +500. The next bar closes down on 200 units, bringing it to +300. A third closes up on 900, lifting it to +1200 — buyers are accumulating faster than sellers are distributing.

Example Chart

Example Chart

Obv Trend (Momentum)

Real Data32/ 100Composite score

Metrics Per Trade

Metrics Per Trade

Real data · Obv Trend (Momentum)

Final Metrics

Final Metrics

Real data · Obv Trend (Momentum)

Scores

Scores

Real data · Obv Trend (Momentum)

Resampled Data36/ 100Composite score

Metrics Per Trade

Metrics Per Trade

Resampled data · Obv Trend (Momentum)

Final Metrics

Final Metrics

Resampled data · Obv Trend (Momentum)

Scores

Scores

Resampled data · Obv Trend (Momentum)