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.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。