Indicators: delta statistics and divergences

The extended Delta group of the indicator library adds nine studies on bar delta: a delta % histogram, intrabar max and min delta, trades delta, bid/ask share, delta z-score, delta streak, bar-to-bar delta divergence markers and stacked imbalance squares.

Senzoukria · Documentation · Updated September 2026


Where to find it

Where
Chart → Indicators button → group Delta (gear icon opens the settings of each study)
Studies
delta-percent-histogram, max-delta, min-delta, trades-delta, bid-ask-ratio, delta-zscore, delta-streak, delta-divergence, stacked-imbalance
Session reset
None: these oscillators are continuous; only the Session CVD study is anchored to the session
Smoothing default
1 (no smoothing) on the histogram studies, range 1 to 200 bars

What these studies measure

Bar delta is the sum of buy volume minus sell volume across the price levels of the bar, aggregated by the backend and never recomputed by the library. The studies in this group derive statistics from that value and from the per-level counts carried by each bar. Seven of them draw in their own pane; delta-divergence and stacked-imbalance draw markers on the price chart.

Delta % Histogram is totalDelta / totalVolume × 100, bounded to −100..+100. A bar with zero volume produces no point rather than 0 %. Max Delta and Min Delta read the optional intrabar extremes (deltaHigh / deltaLow) that the backend attaches when the tick source provides them; a bar without those fields produces no point, because the extremes cannot be rebuilt from aggregated levels.

Trades Delta sums buyTrades − sellTrades over usable levels, so it compares the number of aggressive executions on each side instead of contracts. Bid/Ask Ratio % is buy / (buy + sell) × 100, read around an implicit 50 % midline; a bar without volume leaves a gap. Delta Z-Score is (delta − mean) / population standard deviation over the last N bars including the current one, with null during warm-up and when the window is flat. Delta Streak counts consecutive bars with the same delta sign (+1, +2… or −1, −2…), and a bar with delta exactly 0 resets the count to 0.

Settings

Parameters as declared in the catalog (desktop/src/lib/footprint/series/catalog/delta2.ts)
StudySettingDefaultWhat it changes
Delta % Histogram, Trades Delta, Delta StreakPositive color / Negative color / Smoothinggreen / red / 1Histogram colors per sign; Smoothing 1 to 200 applies a simple moving average after the calculation
Max DeltaPositive color / Negative color / Smoothinggreen / gray / 1Same, with gray for the negative side of the intrabar maximum
Min DeltaPositive color / Negative color / Smoothinggray / red / 1Same, with gray for the positive side of the intrabar minimum
Bid/Ask Ratio %Color / Smoothingcyan / 1Line color and post-smoothing
Delta Z-ScorePeriod20 (2 to 500)Window of the mean and population standard deviation
Delta DivergenceBearish color / Bullish colorred / greenColor of the arrow-down at the high and arrow-up at the low
Stacked ImbalanceRatio k / Min qty / Min stack3 / 10 / 3Diagonal imbalance ratio, minimum quantity guard, minimum consecutive levels (k 1 to 20 by 0.5, qty 0 to 10000, stack 2 to 20)
Stacked ImbalanceBuy color / Sell colorgreen / redSquare color per side

How to read the markers

  • Delta Divergence compares each bar with the previous one: close higher and delta negative places an arrow-down at the bar high; close lower and delta positive places an arrow-up at the bar low. Both inequalities are strict, so an unchanged close or a zero delta yields no marker, and the first bar of the chart never has one.
  • Stacked Imbalance detects diagonal imbalances (buy at P versus sell one tick below, ATAS convention) and requires at least Min stack strictly consecutive levels carrying the same flag; a gap in the price grid breaks the stack. One square is drawn at the highest level of the stack for both buy and sell stacks. It uses the same detection as the Stacked Imbalances study of the Tape & flow group, which draws arrows at the top or base instead.
  • Without a known tick size the diagonal test cannot run, so Stacked Imbalance draws nothing rather than guessing a grid.

Limits

  • Max Delta and Min Delta depend on what the source delivers; historical frames built from aggregated levels leave gaps. The study guide card of Delta min/max, the line pair of the base Delta group, states the same limit for those intrabar extremes.
  • The 50 % midline of Bid/Ask Ratio is not drawn by the renderer; read the oscillator around 50.
  • Smoothing is a plain moving average applied after the calculation; with the default 1 the output is untouched.
  • None of these values are trade signals. They describe the executed flow of loaded bars and do not evaluate positions or send orders.

This page in other languages

Frequently asked questions

Why does Delta Z-Score show nothing on the first bars?
The study needs N bars (default 20) to compute its mean and standard deviation, and it also returns null whenever the standard deviation is zero, because a z-score is undefined on a flat window.
What is the difference between Delta Divergence and Price/Delta Divergence?
Delta Divergence draws point events on the price chart from a strict bar-to-bar rule. Price/Delta Divergence, the study with the id delta-divergence-strength in the base Delta group, is a continuous score drawn in its own pane.
Does a zero-delta bar extend a delta streak?
No. A bar whose delta is exactly 0 outputs 0 and breaks the streak; the next signed bar restarts at +1 or −1.

Keep reading