OPEN-SOURCE SCRIPT

KAS Volume Delta

625
KAS Volume Delta is a per-candle volume delta histogram that shows the directional buy and sell pressure behind every bar. It reads each candle's direction together with its volume to estimate net order pressure, then adds a signal line and highlights bars with exceptional delta. It is a clean, lightweight way to add order-flow context to any chart that provides volume data.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT IT DOES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Plots a per-candle volume delta histogram (green for net buying, red for net selling).

Splits indecision (Doji) candles by their close position so flat bars still carry a directional bias.

Draws a Delta SMA signal line to track whether pressure is accelerating or fading.

Highlights dominant bars where the absolute delta exceeds twice its recent average.

Optionally normalizes delta by average volume for cross-instrument comparison.

Optionally tints the main-chart candles by delta direction (off by default).

Shows a compact status readout: current bias, SMA signal state, dominant state.

Includes four alerts on delta zero-cross and SMA-cross events.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Bar-Level Delta: Each candle's delta is set to +volume when close is above open (net buying) and -volume when close is below open (net selling). This is a transparent estimate computed directly from OHLC and volume, with no lower-timeframe dependency.

Doji Handling (hl2 midpoint): On indecision candles where close equals open, delta is split by the close-versus-midpoint position. A close at or above hl2 yields +0.5x volume (soft buying); below hl2 yields -0.5x volume (soft selling). Flat bars therefore still contribute a directional bias instead of a zero.

Delta SMA Signal Line: A simple moving average of delta over a configurable length (default 21) acts as a signal line. Delta crossing above the SMA indicates buying pressure accelerating; crossing below indicates selling pressure building.

Dominant Bar Detection: The absolute delta is compared against its own 20-bar average. When a bar's magnitude exceeds twice that average, it renders at full opacity and greater width, surfacing exceptional single-bar pressure with no manual reading.

Optional Normalization: When enabled, delta is divided by the 20-bar volume average, producing a relative ratio that makes delta intensity comparable across different instruments and timeframes.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY IT'S UNIQUE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Unlike TradingView's native Volume Delta, which relies on lower-timeframe intrabar data and can behave inconsistently on higher timeframes or illiquid symbols, this indicator computes a transparent bar-level delta directly from each candle, with no lower-timeframe dependency.

Unlike scripts that assign zero delta to indecision candles, this indicator splits Doji volume by the close-versus-midpoint (hl2) position at plus or minus 0.5x volume, preserving directional bias on flat bars.

Unlike cumulative delta tools that focus on a single running aggregate line, this indicator stays per-candle and flags dominant bars whenever delta magnitude exceeds twice its own recent average.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Add to any timeframe; works well from 5m to 4h for intraday and swing context.

Default settings are calibrated for liquid symbols (major crypto, large-cap stocks, major FX).

Read the histogram against the SMA signal line: sustained bars beyond the line confirm momentum; dominant bars mark exceptional initiation or exhaustion.

Enable Normalization when comparing delta intensity across different instruments.

Pair with your existing price structure or trend tools for confluence.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LIMITATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Requires a symbol that provides volume data; on feeds without volume the histogram will be empty.

The bar-level method is an approximation of order flow based on candle direction. It does not measure true intrabar buy/sell execution.

The SMA signal line lags by design and reacts after a move has begun.

This tool is for analytical purposes only and does not constitute financial advice.

Past signal behavior is not indicative of future results.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
KNECHT ALPHA SIGNALS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Institutional-grade Volume Delta, Momentum, and MTF Analysis for TradingView.
Built for traders who demand precision over noise.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.