How it is calculated
As TA-Lib's OBV (Granville 1963): the line starts at the first bar's volume, not at zero. Each later bar adds its volume when the close is above the previous close, takes it off when the close is below, and leaves the line where it is when the close is unchanged. It has a value from the first bar.
Reference: TA-Lib OBV (Granville 1963)
How to read it
The level itself means nothing, since it depends on where the data starts; read its direction against price. A new price high that OBV does not confirm is a bearish divergence, the reverse a bullish one. On forex the volume is tick volume, the number of price changes, so OBV follows activity rather than traded size.
In a strategy
As a trend filter: compare ctx.ind("obv") with its value some bars earlier and only take longs while it rises, or look for a new price high that comes with a lower OBV high.
Inputs
It takes no inputs.
What it draws
| Line | Drawn as |
|---|---|
| OBV | Line |
Used in
No strategy template reads it yet.