OBV Divergence Strategy: How to Build It in Arrow Algo

An OBV divergence strategy hunts for the moments when volume stops agreeing with price. On-Balance Volume, created by Joe Granville in 1963, runs on a famous premise: volume precedes price. When price grinds to a new high but OBV refuses to follow, the buyers behind the move are thinning out — and the chart is often the last to admit it. Divergence trading turns that disagreement into a signal.

What Is OBV Divergence?

On-Balance Volume is a running total: add the period’s volume when price closes up, subtract it when price closes down. The absolute number is meaningless — what matters is the direction and shape of the line, as Investopedia explains. OBV divergence occurs when price and OBV make opposite patterns at extremes:

The logic: OBV tracks conviction. Price can drift on thin participation, but sustained moves need volume behind them.

Why Does Volume Divergence Matter?

Every price move has two readings — how far it went, and who showed up for it. A breakout on collapsing OBV is a party with no guests: the new high exists, but the accumulation that sustains new highs does not. Divergence does not time reversals precisely. What it does is flag deteriorating quality early, often several swings before the turn. That makes it stronger as a filter and a warning system than as a standalone trigger — the same caveat that applies to MACD divergence.

Making Divergence Mechanical

“Spot the divergence” is easy for eyes and vague for rules. A systematic version compares extremes over a fixed window:

Mirror the logic with lowest values for the bullish version. The window length sets sensitivity: shorter windows catch minor divergences, longer ones only the major turns.

The Rule Set for an OBV Divergence Strategy

Bullish Divergence Reversal

OBV as a Breakout Filter

Building It in Arrow Algo

  1. Add an OBV block and connect your candle feed.
  2. Use Max/Min blocks over your chosen window on both price and the OBV output — comparing current values against those extremes defines the divergence mechanically.
  3. Combine the two conditions with an AND gate, then add your trigger: a crossover block on price and a short EMA.
  4. For the filter variant, add a moving average on OBV and gate your existing breakout entries with it.
  5. Backtest on Binance, Coinbase, or HyperLiquid data — and remember exchange volume differs between venues, so test where you trade.

What Are the Common Mistakes?

What Should You Remember?

Disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.

Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who’ve made the switch to systematic trading.