Demand Index Node

Buying vs Selling Pressure Ratio

VolumePressureNo Parameters

Overview

The Demand Index Node measures the ratio of buying pressure to selling pressure on each bar. By dividing the volume-weighted distance from low to close (buy volume proxy) by the volume-weighted distance from close to high (sell volume proxy), it produces a dimensionless ratio centered around 1.

Values above 1 indicate buying pressure dominance (demand exceeds supply); values below 1 indicate selling pressure dominance. The indicator requires no period parameter — each bar is computed independently from its own OHLCV data, making it immediately responsive to price and volume changes.

Algorithm

range = max(high − low, 1)
BP (Buying Pressure) = volume × (close − low) / range
SP (Selling Pressure) = volume × (high − close) / range
DI = BP / SP (if SP = 0 and BP > 0: DI = 2, else DI = 1)
Output: DI ratio. No warm-up — computed bar-by-bar from OHLCV.
DI > 1 = buying dominance; DI < 1 = selling dominance; DI = 1 = balanced.

Parameters

No configurable parameters. The Demand Index is fully determined by each bar's OHLCV data.

Inputs & Outputs

SlotDirectionTypeDescription
inputInputOHLCVStandard OHLCV price and volume data
valuesOutput(number | null)[]Demand Index ratio (DI > 1 = buying, DI < 1 = selling)
timestampsOutputnumber[]Unix timestamps aligned to input

Use Cases

Intraday Buying/Selling Pressure

Use DI on each bar to measure the instantaneous balance of buying vs selling pressure. A sustained sequence of DI > 1 bars indicates accumulation; DI < 1 bars indicate distribution — without the lag of cumulative volume indicators.

Volume Divergence Confirmation

Compare Demand Index against price trend: price making higher highs while DI is declining indicates weakening buying pressure even as price rises — a bearish divergence suggesting the uptrend may be running out of volume support.

Breakout Quality Assessment

At a breakout bar, a DI > 2 (strong buying dominance) confirms that the breakout is driven by genuine demand rather than a thin-volume false breakout. Low DI on a breakout bar (near 1.0) signals low conviction and higher reversal risk.

Tips & Best Practices

Doji Bars Produce DI = 1

When close ≈ open and high − low is small (doji candles), BP ≈ SP so DI ≈ 1. These neutral bars indicate indecision. Filter them out by requiring minimum range before acting on a DI signal.

Smooth Before Thresholding

DI is noisy on a bar-by-bar basis. Apply a 3–5 period SMA to the output before using threshold crossings (e.g., DI crossing above 1.5) as signals. This removes single-bar spikes without significantly increasing lag.

Complement with OBV or CMF

Demand Index measures per-bar pressure; OBV and CMF measure cumulative flow. Combine: use DI for real-time pressure confirmation and OBV/CMF for trend-level accumulation/distribution assessment.

Related Indicators