PROTECTED SOURCE SCRIPT
Telah dikemas kini Smart Money Time (SMT)

SMT Divergence – 90m / 30m / 10m (Prev-Cycle, Real-Time, Trailing)
Purpose:
This indicator finds SMT (Smart Money Technique) divergences between two related markets (e.g.,
NQ1! vs
ES1! ). It does this per 90m/30m/10m cycles and only compares the current cycle to the immediately previous cycle—never older. It supports three cycle granularities:
For each cycle, the script tracks each symbol’s extreme (highest high for potential bearish SMT, lowest low for potential bullish SMT). When the leader sets a new extreme vs its own previous cycle while the lagger fails to do so vs its previous cycle, an SMT divergence is formed and plotted on the chart in real time. Lines trail as price makes new extremes within the same cycle.
What you’ll see on the chart:
Default styling (editable):
You can toggle the text on/off and change width, style, and colors separately for 90m, 30m, and 10m.
Signals (definitions)
The line is drawn on Primary A by default.
Settings (explained)
Symbols
Detection toggles
Validate candle direction
Delete SMT when invalidated
Enable alerts
Appearance – per timeframe (90m / 30m / 10m)
Text Options
How to use
Notes & behavior
Tips
Disclaimer: Educational use only. Markets are risky; do your own research and manage risk responsibly.
Purpose:
This indicator finds SMT (Smart Money Technique) divergences between two related markets (e.g.,
- 90-minute cycles (9 blocks from 02:30–16:00 NY time)
- 30-minute sub-cycles (27 blocks)
- 10-minute sub-cycles (81 blocks; exactly 3 per 30-minute cycle)
For each cycle, the script tracks each symbol’s extreme (highest high for potential bearish SMT, lowest low for potential bullish SMT). When the leader sets a new extreme vs its own previous cycle while the lagger fails to do so vs its previous cycle, an SMT divergence is formed and plotted on the chart in real time. Lines trail as price makes new extremes within the same cycle.
What you’ll see on the chart:
- A line from the previous cycle’s extreme to the current cycle’s extreme on the symbol pane where the indicator is applied (Primary A).
- An optional text label at the current extreme (e.g., “90m SMT”, “30m SMT”, “10m SMT”).
- Lines update (“trail”) as the current cycle goes on. When a new cycle begins, tracking resets for that cycle.
Default styling (editable):
- 90m SMT: solid, width 1, black
- 30m SMT: solid, width 1, black
- 10m SMT: dotted, width 1, black
You can toggle the text on/off and change width, style, and colors separately for 90m, 30m, and 10m.
Signals (definitions)
- Bearish SMT: One market makes a Higher High vs its own previous cycle, while the other fails to make a Higher High vs its previous cycle.
- Bullish SMT: One market makes a Lower Low vs its own previous cycle, while the other fails to make a Lower Low vs its previous cycle.
The line is drawn on Primary A by default.
Settings (explained)
Symbols
- Primary Symbol A – the chart’s “leader/lagger” pane the script draws on.
- Comparison Symbol B – the second market used for SMT checks.
Detection toggles
- Detect SMT: 90m / 30m / 10m – turn on/off detection for each timeframe.
- Note: The script always compares current cycle ↔ previous cycle only.
Validate candle direction
- When enabled, the bar that makes the new extreme must also close in the confirming direction on that same market:
- Bearish SMT: the bar that made the new Higher High must be a down close (close < open).
- Bullish SMT: the bar that made the new Lower Low must be an up close (close > open).
- This filter removes many “wick-only” probes and reduces false positives.
- Turn off if you prefer to register SMTs on any intrabar extreme, regardless of bar close.
Delete SMT when invalidated
- After an SMT forms, if the lagger later breaks the previous extreme it initially failed to break, the divergence is considered invalid and the script deletes the line and its label. (An “SMT invalidated” alert can fire if alerts are enabled.)
Enable alerts
- Fires on SMT formed (separate messages for 90m/30m/10m and bullish/bearish) and on SMT invalidated.
- To use, click Create Alert on the indicator and choose “Any alert() function call”. Use “Once per bar” (or per bar close) to taste.
Appearance – per timeframe (90m / 30m / 10m)
- Bullish/Bearish colors, Line width, Line style, Show text (toggle subtitle label).
Text Options
- Text color, Text size, Text offset (vertical spacing from the extreme).
How to use
- Add to chart and select two related markets, e.g., NQ (A) vs ES (B).
- Choose which cycles to monitor (90m / 30m / 10m).
- Optionally enable Validate candle direction to demand a confirming close on the bar that made the extreme.
- Watch for plotted SMTs:
- Bearish SMT (HH vs no HH) often signals potential weakness
Bullish SMT (LL vs no LL) often signals potential strength - Use SMTs as context/confluence—e.g., near session highs/lows, liquidity pools, PD arrays, or your own levels. Combine with structure, order flow, and risk rules.
- Turn on alerts to be notified when SMTs form or are invalidated in real time.
Notes & behavior
- New-York session timing: Cycles are fixed windows in America/New_York and automatically handle DST.
- Real-time & trailing: Lines trail to the most recent extreme within the same cycle but there’s no look-ahead across cycles.
- No repaint across cycles: Each signal is strictly current cycle vs previous cycle.
- Cleanup: On invalidation the script deletes the label first, then the line, preventing orphan labels.
Tips
- 10m SMTs are more frequent/noisier; 90m are fewer but more meaningful. Many traders look for multi-frame agreement (e.g., a 30m SMT aligning with a fresh 10m SMT).
- If you want fewer signals, keep Validate candle direction on; if you want maximum sensitivity, turn it off.
Disclaimer: Educational use only. Markets are risky; do your own research and manage risk responsibly.
Nota Keluaran
Update – performance patchSmall speed-focused patch. I rewrote cycle detection to a fast math-based method (no more scanning 117 time windows each bar) and switched to O(1) trailing pointers so SMT lines/labels update more smoothly in real time.
All logic is unchanged: SMT is still calculated between the current and previous cycle only.
More refinements coming soon.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.