OPEN-SOURCE SCRIPT
SMT + CVD (NQ vs ES) w/ Alerts

SMT + CVD (NQ vs ES) w/ Alerts
This tool combines Smart Money Technique (SMT) and Cumulative Volume Delta (CVD) to highlight high-probability inflection points on NQ (primary) versus ES (secondary).
How it works
SMT condition: the primary breaks its most recent swing (High for bearish / Low for bullish) while the secondary does not break the corresponding swing within a small retest window.
CVD confirmation: at the same time, the primary’s CVD shows divergence (higher price but lower/equal CVD for shorts, lower price but higher/equal CVD for longs).
When both align, the script plots a marker/label and draws a line from the primary swing to the signal bar. Alerts are fired.
Signals & Alerts
Labels: “SMT+CVD DOWN/UP” on the signal bar.
Lines: connects the primary swing → signal bar so you can see the structure that produced the signal.
Alert names: “SMT+CVD Bearish” and “SMT+CVD Bullish.”
Inputs
Primary / Secondary symbols: defaults NQ & ES (you can change them).
Resolution: use chart timeframe or specify one.
Swing Left/Right Bars: pivot detection depth (higher = larger swings).
Break Window Bars: how many bars the secondary has to not break for SMT to be valid.
CVD Up/Down By: Close vs Previous Close (default) or Close vs Open.
Anchor CVD Daily: resets CVD at session/day start.
CVD Smoothing (EMA): smooths the CVD line (optional show).
FAST Pivots (no future bars): left-only swing detection so signals appear sooner and behave well in Replay/live.
Require Secondary Pivot: if ON, SMT checks wait for a confirmed secondary swing; if OFF, signals can appear while the secondary swing is still forming (useful for Replay/testing).
Show CVD line: optional, may compress price scale.
Non-repaint notes
With FAST Pivots ON, swings are detected with no future bars (minimal latency = leftBars).
With FAST Pivots OFF, standard pivots require rightBars future bars to confirm the swing (classic, but naturally delayed).
Tips
For intraday futures, keep leftBars/rightBars small (e.g., 3/3) and Break Window 1–3.
In Replay, enable FAST Pivots and consider disabling Require Secondary Pivot if you want signals to appear as soon as the primary breaks.
Combine with session filters, execution rules, or liquidity zones for context.
This tool combines Smart Money Technique (SMT) and Cumulative Volume Delta (CVD) to highlight high-probability inflection points on NQ (primary) versus ES (secondary).
How it works
SMT condition: the primary breaks its most recent swing (High for bearish / Low for bullish) while the secondary does not break the corresponding swing within a small retest window.
CVD confirmation: at the same time, the primary’s CVD shows divergence (higher price but lower/equal CVD for shorts, lower price but higher/equal CVD for longs).
When both align, the script plots a marker/label and draws a line from the primary swing to the signal bar. Alerts are fired.
Signals & Alerts
Labels: “SMT+CVD DOWN/UP” on the signal bar.
Lines: connects the primary swing → signal bar so you can see the structure that produced the signal.
Alert names: “SMT+CVD Bearish” and “SMT+CVD Bullish.”
Inputs
Primary / Secondary symbols: defaults NQ & ES (you can change them).
Resolution: use chart timeframe or specify one.
Swing Left/Right Bars: pivot detection depth (higher = larger swings).
Break Window Bars: how many bars the secondary has to not break for SMT to be valid.
CVD Up/Down By: Close vs Previous Close (default) or Close vs Open.
Anchor CVD Daily: resets CVD at session/day start.
CVD Smoothing (EMA): smooths the CVD line (optional show).
FAST Pivots (no future bars): left-only swing detection so signals appear sooner and behave well in Replay/live.
Require Secondary Pivot: if ON, SMT checks wait for a confirmed secondary swing; if OFF, signals can appear while the secondary swing is still forming (useful for Replay/testing).
Show CVD line: optional, may compress price scale.
Non-repaint notes
With FAST Pivots ON, swings are detected with no future bars (minimal latency = leftBars).
With FAST Pivots OFF, standard pivots require rightBars future bars to confirm the swing (classic, but naturally delayed).
Tips
For intraday futures, keep leftBars/rightBars small (e.g., 3/3) and Break Window 1–3.
In Replay, enable FAST Pivots and consider disabling Require Secondary Pivot if you want signals to appear as soon as the primary breaks.
Combine with session filters, execution rules, or liquidity zones for context.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.