OPEN-SOURCE SCRIPT

Volume Delta Pressure [JOAT]

6 490
Volume Delta Pressure estimates how much of each bar's volume was buying versus selling, then turns that split into a clean read on who is actually in control. It combines a per-bar delta engine, a cumulative session delta line, a normalized pressure oscillator, gradient candle heat, VWAP bands, and a full on-chart dashboard — so order flow becomes something you can see at a glance instead of guessing.

istantanea

▎ WHAT IT DOES
It reconstructs buy/sell volume for every candle, tracks the running net delta across the session, and measures whether current flow is stretched into Accumulation or Distribution. From that it colors your candles by pressure, prints cooldown-gated BUY/SELL labels, flags CVD/price divergences, and reports the full picture in a top-corner panel.

▎ HOW IT WORKS
Delta engine — Two methods. Lower-TF Intrabar polls a smaller timeframe, signs each intrabar by its direction (up = buy, down = sell, doji split), and sums the volume. Range/Body Proxy splits chart-bar volume using where close sits inside the bar's range blended with candle-body direction. Auto uses intrabar data when available and falls back to the proxy everywhere else.
Bar delta — Buy volume minus sell volume for the current candle, plus buy% / sell% of total bar volume.
CVD — Cumulative volume delta that adds each bar's delta and resets on your chosen anchor (session/day, week, month, or never).
Pressure oscillator — Delta is EMA-smoothed, then normalized either as a Z-Score against its rolling mean/stdev (roughly −3..+3) or as % of Volume (−100..+100). This single value drives the state, gauge, and candle color.
Signals — A BUY fires when pressure crosses up through zero; a SELL when it crosses down. Each flip must also pass a delta-expansion filter (absolute delta above a multiple of its recent average), optional price confirmation (up close for buys, down close for sells), an optional divergence requirement, and a cooldown that blocks stacked same-side signals. Signals only confirm on bar close.
Divergence — Pivot highs/lows on price are compared against CVD at the same pivot. Price lower-low with CVD higher-low prints a Bull Div; price higher-high with CVD lower-high prints a Bear Div. Each stays "active" for a set number of bars.
VWAP + σ bands — Anchored VWAP with inner and outer standard-deviation channels, tinted green above / red below.
No-volume guard — On assets that report no volume, signals switch off and the dashboard shows a clear notice instead of printing misleading data.

▎ HOW TO USE IT
• Read candle heat first: deep green = strong net buying, grey = balanced, deep red = strong net selling. Candles flash full color on a confirmed signal.
• Treat BUY / SELL pills as flow-flip alerts, not standalone entries. They are strongest when they agree with the CVD trend and VWAP location.
• Use CVD to judge conviction behind a move — price up while CVD falls warns the push is thin.
Divergence labels mark spots where price and delta disagree — useful for anticipating exhaustion or reversal.
• Trade with the VWAP channel: above VWAP favors longs, band edges mark stretched conditions and mean-reversion zones.
• For fewer, higher-quality signals, turn on Require CVD Divergence and keep price confirmation on.

▎ KEY SETTINGS
Engine — Delta method, intrabar timeframe (auto or manual), proxy close-vs-body weight, and delta smoothing.
Pressure Oscillator — Normalization mode, lookback, and the Accumulation / Distribution thresholds.
CVD & Divergence — Reset anchor, pivot length, recency window, and label caps.
Signals — Expansion multiplier and baseline, price/divergence requirements, cooldown, and label size/cap.
VWAP — Source, anchor, inner/outer σ multipliers, and colors.
Visuals — Gradient candle toggle, saturation points, and the buy/neutral/sell color set.
Dashboard — Show/hide, position, and text size.

istantanea

▎ DASHBOARD
A top-right gradient panel reporting: delta source (LTF or Proxy), bar delta, session/cumulative CVD and its trend, buy% and sell%, the pressure value, a segmented flow gauge, the current State (Accumulation / Distribution / Neutral), active divergence, dominant side, VWAP location, and the last active signal — each cell color-coded by side.

▎ ALERTS
Buy Pressure Flip — fires on a confirmed BUY signal.
Sell Pressure Flip — fires on a confirmed SELL signal.

▎ NOTES
• Works on all timeframes and assets that report volume; degrades gracefully where volume is absent.
• Signals confirm on bar close, so labels and alerts do not repaint after the bar completes.
• Every visual layer — candles, VWAP, labels, dashboard — toggles independently for a clean chart.
• Delta is an estimate reconstructed from price and volume, not exchange-reported order flow.

For research and education only. This is not financial advice. No indicator can predict the future, and past behavior does not guarantee future results. Always do your own analysis and manage your own risk.

Made with passion by JackOfAllTrades ⚡

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.