VOLUME & MONEY FLOW

On-balance volume

A running tally of volume with a sign attached.

spec id: obv

What does On-balance volume measure?

A running tally of volume with a sign attached. Rising while price is flat says buyers are quietly accumulating.

How is On-balance volume calculated?

Start at zero. Add the whole candle's volume when it closes higher than the previous close, subtract it when it closes lower, and leave it alone when the close is unchanged.

Written by reading the engine’s real computation, not a textbook — where the two differ, the page describes what actually runs.

How do I use On-balance volume in a bot?

In the builder, add an indicator of type obv. Its value becomes an operand you can compare in any entry or exit rule. The engine grades the whole rule honestly: real fills, no look-ahead, half the history held back.

Related indicators

Or browse all 158 indicators in the full library.

Build a bot that trades on On-balance volume — the first backtest is free.

Run a free backtest