Skip to content

OBV

Indicators

  • Price
  • Volume
OBV

20-candle signal line

  • OBV
  • Signal line
This is how the node looks on the board: inputs on the left, outputs on the right.

Volume added up by price direction. The On-Balance Volume line adds each candle’s volume when the price rose and subtracts it when it fell. When it rises, the volume comes mainly on rising prices; when it falls, on falling ones. The height of the OBV depends on the candle where counting started, so on its own it means nothing. For alerts use its direction or its crossing with the signal line, its average over the last candles, not fixed thresholds. Example: “OBV crosses above OBV signal 20” fires when more volume comes on rising prices again, sometimes before the price breaks out.

BTC/USDT price and OBV with signal line 20Dots mark where the OBV crosses above its signal line.Price BTC/USDT81,00082,00083,00084,000OBV in BTC-20,000-15,000-10,000Oct 8Oct 9Oct 10Oct 11Oct 12
  • Price (close of each candle)
  • OBV
  • Signal line, average of the last 20
  • crosses above the signal line
Top: the price; bottom: the OBV and its signal line of the same 1-hour candles, counted from the first of the 500 candles. If counting started elsewhere, the line would only sit higher or lower; the crossings at the dots would stay the same.

The settings appear on the right under “Properties” once you click the node on the board. Below each field you find the same explanation as here.

Default: 20 · from 2 to 500, whole number

How many candles the signal line averages the OBV over. 20 is usual. With fewer candles the OBV crosses its signal line more often, with more less often but on clearer shifts.

Notifies you when the OBV crosses above its signal line, so more volume comes on rising prices again.

Example chain: Candle, OBV, Compare A/B, PushConnections: Candle → OBV, Candle → OBV, OBV → Compare A/B, OBV → Compare A/B, Compare A/B → Push.CandleBTC/USDT · 1hOBV20-candle signal lineCompare A/BOBV crosses above OBVsignal 20Pushat most every 4 h

How to connect the nodes:

  1. Candle (Price) → OBV (Price)
  2. Candle (Volume) → OBV (Volume)
  3. OBV (OBV) → Compare A/B (A)
  4. OBV (Signal line) → Compare A/B (B)
  5. Compare A/B (true/false) → Push (Trigger)

On the board it reads: 20-candle signal line

Chain as JSON

To try it, copy it and paste it in the editor under “Import”. Importing creates a new chain.

obv.json
{
"name": "Example: OBV",
"version": 1,
"nodes": [
{ "id": "c1", "type": "core.candle", "position": { "x": 40, "y": 40 }, "settings": { "pair": "BTC/USDT", "timeframe": "1h" } },
{ "id": "o1", "type": "core.obv", "position": { "x": 260, "y": 40 }, "settings": {} },
{ "id": "k1", "type": "core.compare-ab", "position": { "x": 480, "y": 40 }, "settings": { "operator": "crossesAbove" } },
{ "id": "p1", "type": "core.push", "position": { "x": 700, "y": 40 }, "settings": {} }
],
"edges": [
{ "from": "c1.close", "to": "o1.close" },
{ "from": "c1.volume", "to": "o1.volume" },
{ "from": "o1.out", "to": "k1.a" },
{ "from": "o1.average", "to": "k1.b" },
{ "from": "k1.out", "to": "p1.in" }
]
}

Only matching types connect: number series to number series (round pin), signal to signal (square), message to message (diamond).

Direction Pin Type Note
Input Price Number series required
Input Volume Number series required
Output OBV Number series –
Output Signal line Number series –
  • In messages the values are called “OBV”, “OBV signal 20”.
  • Warm-up with the default settings: 21 candles (this many extra candles are loaded by the replay before the value is reliable).
  • Search also finds it under: obv, on-balance volume, volume, accumulation, buying pressure, divergence.

Running sum of the sign of the change in the close times volume, the first candle is 0, signal line as its SMA; the same formula as ta.obv in TradingView.

  • Type in the chain: core.obv · Version 1.0.0 · Category key ind
  • Settings in the chain: length (Signal line)
  • Pins in the chain: Input close, volume · Output out, average
  • Reference tests in the manifest: 1 (with fixed price data: 500 candles of 1h)
  • How a node is built

Version 2026.10.21.23 · Changelog