What it does
On-Balance Volume (OBV) is a running total that adds a bar's volume when price closes higher and subtracts it when price closes lower. The idea is that volume tends to lead price: if OBV keeps rising while price moves sideways, buying pressure may be building. This version plots OBV in a separate window with an EMA signal line and marks crosses between the two.
How it works
- If the close is above the previous close, OBV = previous OBV + volume.
- If the close is below the previous close, OBV = previous OBV - volume.
- If the close is unchanged, OBV stays the same.
- Signal = EMA of OBV with smoothing factor 2 / (period + 1).
- An up arrow prints on a closed bar where OBV moves from at or below the signal to above it; a down arrow marks the opposite cross.
The starting value of OBV is arbitrary (it begins at zero on the first loaded bar), so only its direction and shape matter, not the number itself. Volume is tick volume by default; if you choose real volume and the broker reports zero, tick volume is used for that bar.
How to use it
Common ways to read OBV:
- Confirmation: in an uptrend, OBV making higher highs alongside price supports the move.
- Divergence: price makes a new high but OBV does not, which can warn that participation is fading.
- Signal crosses: OBV crossing above its EMA shows volume flow turning positive over the signal period, and crossing below shows it turning negative.
Crosses are frequent, so they work best as a filter for setups found elsewhere, for example with trendlines or support and resistance. H1 and above give smoother readings. Read the technical analysis basics lesson for how volume tools fit into a wider approach.
Settings
| Input | Default | What it changes |
|---|---|---|
| Volume type | Tick volume | Source of the volume added or subtracted |
| Signal EMA period | 20 | Longer periods give fewer, slower crosses |
| Show cross arrows | true | Turns the subwindow arrows on or off |
| Popup alert / Push notification | false | Alerts once per bar on a new cross |
Limitations
- In spot forex, tick volume counts price updates, not traded size, so OBV is only an approximation of real flow.
- A single high-volume bar can shift OBV for a long time, because every bar's full volume is counted.
- Signal-line crosses happen often in ranges and lag at turning points.
- OBV values differ between brokers because their tick feeds differ.

