OPEN-SOURCE SCRIPT
Updated

CVD + SMT DIVERGENCE VWAP ULTIMATE

5 885
## **CVD + SMT DIVERGENCE VWAP ULTIMATE v2**

### **Overview**

CVD + SMT DIVERGENCE VWAP ULTIMATE v2 is an advanced, institutional-grade scalp engine engineered specifically for index futures traders (optimized for NQ/ES). It merges custom session-reset Cumulative Volume Delta (CVD) divergence detection, multi-asset SMT (Smart Money Technique) confirmation, dynamic standard deviation VWAP channels, and high-contrast neon visual themes into a single, cohesive ecosystem.

---

### **Key Features**

* **Session-Reset CVD Divergence Engine:** Tracks aggressive buying and selling pressure by anchoring delta calculations directly to the regular session open, filtering out noise and pinpointing genuine reversal setups via pivot confirmation.
* **Cross-Asset SMT Confirmation:** Automatically cross-references price action and extremes against correlated instruments (ES, YM, GC) to flag institutional divergences and trap setups.
* **Multi-StdDev VWAP & Dynamic Channels:** Features anchored VWAPs with customizable standard deviation multiplier bands (+/-1, +/-2, +/-3) and gradient cloud fills, alongside higher timeframe Weekly and Monthly VWAP references.
* **Integrated Session & Opening Range Tracker:** Built upon a modified framework of BigBeluga’s session engine, featuring custom boxes, mid-range lines, volume/delta statistics, and an on-chart session dashboard for Tokyo, London, New York, and the Opening Range / Initial Balance.
Release Notes
changed some minor default settings so its not all screwed up out the box
Release Notes
updated some monor stuff
Release Notes
fixed the opening range/initial balance not extending to end of day
Release Notes
ok fixed all the weird crap to make everything have the right time etc right out the gate and get rich already or something smell ya later
Release Notes
got rid of the original session crap all together made my own fixed bugs
Release Notes
//version=6

**CVD + SMT Divergence VWAP — ULTIMATE v2**

A cumulative-volume-delta divergence engine with cross-asset SMT confirmation, anchored VWAP standard-deviation bands, and a 0–100 confluence score on every signal.

What changed vs v1

- **True CVD.** Signed volume is summed from intrabar data via a lower-timeframe request, with close-position and bar-polarity fallbacks. v1 used bar polarity alone — every bar was scored as fully buying or fully selling based only on close versus open.
- **Multi-pivot divergence engine.** The last N swing pivots are held in arrays and scanned backwards, so divergences two to five swings apart are found. v1 only ever compared the current pivot to the single previous one, which made most real absorption patterns invisible to it.
- **Hidden (continuation) divergence** alongside regular (reversal), drawn dotted.
- **Magnitude filters.** Price gap normalised to ATR, delta gap normalised to the average absolute per-bar delta, so noise pivots stop firing signals and the same settings behave identically across instruments.
- **SMT folded into the same pivot engine,** with per-symbol enable and an invert flag for inversely correlated instruments (gold against an equity index, DXY against EURUSD).
- **0–100 confluence score:** structure, SMT count, VWAP z-score extension, relative volume, session context, weekly-VWAP location, and delta magnitude. Hover any signal label for the full itemised breakdown.
- **Volume-weighted standard deviation bands.** Bands are true σ around the anchored VWAP, computed in closed form as E[v·p²]/V − vwap², so they widen and contract with the session's actual dispersion instead of tracking a fixed percentage of price. v1's running-mean approximation drifted and understated width early in a session.
- **VWAP anchor decoupled from the CVD reset switch.** In v1, turning off "Reset CVD" silently turned the daily VWAP into a lifetime VWAP.
- **DST-safe session rollover** via a single shifted trade-date integer, replacing hand-rolled timestamp arithmetic.
- **Muted themes plus a global softness dial. Dashboard. Scored alerts.**

**Repaint note:** pivots confirm `prd` bars after the fact, so every marker is drawn with `offset = -prd` and every alert fires on bar close. Nothing here uses lookahead — the signal is late by design, not repainting.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.