PROTECTED SOURCE SCRIPT
Telah dikemas kini SMT Time Windows

# SMT Time Windows
SMT Time Windows is a Pine Script v6 indicator by **Originalsauce1** that automates ICT-style Smart Money Technique (SMT) divergences between two correlated symbols. It detects bullish and bearish SMT divergences using swing highs/lows (pivot logic) across both instruments. Bullish SMT occurs when one symbol makes a higher low while the other forms a lower low; bearish SMT is when one symbol prints a higher high while the other records a lower high. These divergences highlight imbalances in correlated markets and can signal potential momentum shifts. SMT Time Windows plots clear labels for each divergence event and offers comprehensive filtering by custom time sessions.
## Key Features
* **Time Window Filters:** Define up to three custom time windows (e.g. 2:00–4:00 AM, 6:00–8:30 AM, 9:00–10:30 AM) with individual enable/disable toggles. Active windows can be highlighted on the chart with optional background shading for visual cueing.
* **Timezone Support:** User-selectable time zone ensures that time windows align correctly across different session schedules (global session alignment).
* **Adjustable Detection:** Set the pivot **length** (sensitivity of swing detection) and the signal **timeframe**. This pivot-based approach confirms valid swing highs/lows before marking divergences.
* **Clean SMT Labels:** The indicator plots “Bullish SMT” or “Bearish SMT” labels at the relevant pivots, clearly marking each divergence event. Label color and style are customizable, providing a clean visual cue of SMT signals.
* **Chart Highlights:** Optionally shade the chart background during active time windows, making it easy to see when the session filter is in effect.
* **Session Status Table:** An on-chart table shows which time windows are currently active (e.g. shows “Open”/“Closed” status). This real-time session table provides live feedback similar to other TradingView session trackers.
* **Comparison Symbol & Alerts:** Optionally overlay the comparison symbol on your chart. Built-in alerts notify you when bullish or bearish SMT divergences occur, allowing timely review.
## How It Works
SMT Time Windows checks for divergences between two positively correlated markets (for example, equity futures like S\&P 500 (ES) vs Nasdaq 100 (NQ), or FX pairs like US Dollar Index vs EUR/USD). When one instrument’s swing high/low is not confirmed by the other, it flags this as an SMT event. For instance, a **Bearish SMT** is identified when one symbol makes a higher high but the other fails to keep pace (prints a lower high); a **Bullish SMT** is when one symbol’s low is higher while the other’s low is lower. These divergences are interpreted as signs of uneven buying/selling pressure and can precede shifts in momentum.
The indicator is designed for use with correlated markets (e.g. ES/NQ, DXY/EURUSD, etc.) to enhance your market structure analysis. It is not a “set and forget” signal but a tool to spot potential imbalances. Use SMT Time Windows alongside your discretionary analysis and higher-timeframe context for best results.
## Disclaimer
This script is provided *“for educational and informational purposes only”*. It is **not** financial or trading advice. Always perform your own analysis and risk management before making trading decisions.
*Created by Originalsauce1. For educational and informational purposes only.*
SMT Time Windows is a Pine Script v6 indicator by **Originalsauce1** that automates ICT-style Smart Money Technique (SMT) divergences between two correlated symbols. It detects bullish and bearish SMT divergences using swing highs/lows (pivot logic) across both instruments. Bullish SMT occurs when one symbol makes a higher low while the other forms a lower low; bearish SMT is when one symbol prints a higher high while the other records a lower high. These divergences highlight imbalances in correlated markets and can signal potential momentum shifts. SMT Time Windows plots clear labels for each divergence event and offers comprehensive filtering by custom time sessions.
## Key Features
* **Time Window Filters:** Define up to three custom time windows (e.g. 2:00–4:00 AM, 6:00–8:30 AM, 9:00–10:30 AM) with individual enable/disable toggles. Active windows can be highlighted on the chart with optional background shading for visual cueing.
* **Timezone Support:** User-selectable time zone ensures that time windows align correctly across different session schedules (global session alignment).
* **Adjustable Detection:** Set the pivot **length** (sensitivity of swing detection) and the signal **timeframe**. This pivot-based approach confirms valid swing highs/lows before marking divergences.
* **Clean SMT Labels:** The indicator plots “Bullish SMT” or “Bearish SMT” labels at the relevant pivots, clearly marking each divergence event. Label color and style are customizable, providing a clean visual cue of SMT signals.
* **Chart Highlights:** Optionally shade the chart background during active time windows, making it easy to see when the session filter is in effect.
* **Session Status Table:** An on-chart table shows which time windows are currently active (e.g. shows “Open”/“Closed” status). This real-time session table provides live feedback similar to other TradingView session trackers.
* **Comparison Symbol & Alerts:** Optionally overlay the comparison symbol on your chart. Built-in alerts notify you when bullish or bearish SMT divergences occur, allowing timely review.
## How It Works
SMT Time Windows checks for divergences between two positively correlated markets (for example, equity futures like S\&P 500 (ES) vs Nasdaq 100 (NQ), or FX pairs like US Dollar Index vs EUR/USD). When one instrument’s swing high/low is not confirmed by the other, it flags this as an SMT event. For instance, a **Bearish SMT** is identified when one symbol makes a higher high but the other fails to keep pace (prints a lower high); a **Bullish SMT** is when one symbol’s low is higher while the other’s low is lower. These divergences are interpreted as signs of uneven buying/selling pressure and can precede shifts in momentum.
The indicator is designed for use with correlated markets (e.g. ES/NQ, DXY/EURUSD, etc.) to enhance your market structure analysis. It is not a “set and forget” signal but a tool to spot potential imbalances. Use SMT Time Windows alongside your discretionary analysis and higher-timeframe context for best results.
## Disclaimer
This script is provided *“for educational and informational purposes only”*. It is **not** financial or trading advice. Always perform your own analysis and risk management before making trading decisions.
*Created by Originalsauce1. For educational and informational purposes only.*
Nota Keluaran
What I Removed:✅ Session status table and all related code
✅ Table display settings
✅ Unnecessary clutter
What's Still There:
✅ Core SMT divergence detection with proper time anchoring
✅ Time window filtering (2-4 AM, 6-8:30 AM, 9-10:30 AM)
✅ Clean +/- label formatting (+ES1! for bullish, -ES1! for bearish)
✅ Trendlines connecting divergent pivots
✅ Background highlighting for active windows
✅ Alert conditions
✅ Optional comparison symbol plotting
The script is now streamlined and focused purely on SMT detection with your time windows. It should work perfectly for identifying Smart Money Technique divergences during your specific trading sessions!
Nota Keluaran
updated the alerts to pick bull or bear or both Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Doer
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.
Doer
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.