Skip to content
ChartRiderDocs
Docs/Indicators/On-Balance Volume (OBV)

On-Balance Volume (OBV)

Running total of volume that adds a candle's volume when the close rises and subtracts it when the close falls, with automatic divergence lines.

Updated ·Markdown

What you see

A line in its own pane. The pane scales to the lowest and highest OBV of the visible candles, so the shape of the line matters, not its number. Green lines mark bullish and red lines bearish divergences between price and OBV.

How it is calculated

OBV starts at 0 on the first loaded candle. For every following candle:

  • close above the previous close: OBV = previous OBV + volume
  • close below the previous close: OBV = previous OBV − volume
  • unchanged close: OBV stays the same.

The whole volume of the candle counts. Because the total starts at the first loaded candle, its absolute level depends on how much history is loaded; compare its direction and its swings, not its value.

Divergences use the same swing test as the RSI, with Start Range as the swing window; the newest Start Range candles cannot be swings yet. Bullish: a lower low in price with a higher OBV low on the same candles. Bearish: a higher high in price with a lower OBV high.

How to read it

  • OBV rising with price confirms that volume backs the move; OBV flat or falling while price rises suggests weak participation.
  • OBV breaking above its own earlier highs sometimes leads price.
  • Divergences point to accumulation (bullish) or distribution (bearish).

Using it in strategies

Output: value. Since its level depends on the loaded history, fixed thresholds in the Trade Setup are of little use; compare OBV with its own average or look at its direction instead. That is easiest in WickScript, which has OBV built in as the series obv, e.g. obv > sma(obv, 20). With use indicator "OBV" as o you read this indicator's line as o.value.

Settings

Open the settings with the slider icon next to the indicator (Indicators, F3). Numeric settings can be swept as Step 1 / Step 2 parameters when you run a strategy.

Inputs

SettingTypeDefaultDescription
Start RangeNumber21Despite its label, this does not change the OBV line: it is the swing window for divergence detection (the candles before a swing that it has to beat). (min 1)
Look Back RangeNumber2Candles after a swing point that are checked before the swing counts for a divergence. Higher values give fewer, later divergences. (min 1)
HeightNumber70Height of the pane in pixels. (min 30)

Styles

SettingTypeDefaultDescription
Line ColorColor#1e5a01

Outputs

These values can be used in Trade Setup triggers, filters and exits (see Trade Setup) and in WickScript.

OutputIn WickScriptDescription
valuevalue

Use in WickScript

use indicator creates this indicator inside a script, with settings by their ID. Each output is a field of the name after as. See WickScript indicators.

WickScript
wickscript 1
indicator "On-Balance Volume (OBV) from the list" in pane
use indicator "OBV" with range 21 as myObv
show myObv.value as line "value"

Generated from the ChartRider source code on every release – settings, outputs and the WickScript reference always match the app.

Imprint·Privacy·Contact·Changelog·llms-full.txt

Paper trading uses play money only. Nothing in these docs is investment advice.