OPEN-SOURCE SCRIPT
Diupdate

ICT SMT Divergence (Synced)

135
ICT SMT Divergence Indicator (Synced)
This Pine Script indicator for TradingView is designed to identify Smart Money Tool (SMT) Divergences, a core concept within the Inner Circle Trader (ICT) methodology. SMT divergences highlight discrepancies in price action between two highly correlated assets, often signaling potential market reversals by revealing the footprint of institutional (smart money) activity.
Unlike traditional indicator divergences, SMT focuses on the price action (Highs and Lows) of two related instruments. This "Synced" version significantly improves accuracy by accounting for minor timing differences in pivot formations between the correlated assets.
How it Works:
The indicator operates by focusing on the price structure of your main chart's asset and comparing it to the price extremes of a user-defined correlated asset within a specific time window.
Main Chart Pivot Detection:
The script first identifies a significant Pivot High or Pivot Low on your current chart's asset (high and low series) using standard lookback periods (defined by Pivot Left and Pivot Right bars).
Comparison Symbol Price Retrieval (Synchronized):
Once a pivot is confirmed on the main chart, the indicator does not wait for a pivot on the comparison symbol. Instead, it actively searches for the extreme price (highest high for a pivot high, lowest low for a pivot low) of the Comparison Symbol within a defined Time Sync Error range (e.g., ±3 bars) around the main chart's pivot. This ensures that even if the correlated asset's peak or trough occurs a few bars earlier or later, it will still be considered for the SMT analysis.
Structural Comparison:
It then compares the price structure (Higher High, Lower High, Higher Low, Lower Low) of the main chart's current pivot against its previous pivot, and similarly for the comparison symbol's relevant extreme prices. An SMT divergence is identified when these structural moves contradict each other.
Types of SMT Divergence Detected:
The indicator identifies two primary types of SMT Divergence:
Bullish SMT (Bottom Divergence):
Indication: Suggests a potential market bottom and reversal upwards.
Scenario 1 (Classic): Your Main Chart asset makes a Lower Low (LL), while the Comparison Symbol makes a Higher Low (HL) within the Time Sync Error range. (The main chart sweeps liquidity, but the comparison symbol shows underlying strength by refusing to make a new low).
Scenario 2 (Inverse): Your Main Chart asset makes a Higher Low (HL), while the Comparison Symbol makes a Lower Low (LL) within the Time Sync Error range. (The comparison symbol sweeps liquidity, but the main chart shows underlying strength by refusing to make a new low).
Visualization: Marked with teal/bullish lines and labels.
Bearish SMT (Top Divergence):
Indication: Suggests a potential market top and reversal downwards.
Scenario 1 (Classic): Your Main Chart asset makes a Higher High (HH), while the Comparison Symbol makes a Lower High (LH) within the Time Sync Error range. (The main chart sweeps liquidity, but the comparison symbol shows underlying weakness by failing to make a new high).
Scenario 2 (Inverse): Your Main Chart asset makes a Lower High (LH), while the Comparison Symbol makes a Higher High (HH) within the Time Sync Error range. (The comparison symbol sweeps liquidity, but the main chart shows underlying weakness by failing to make a new high).
Visualization: Marked with red/bearish lines and labels.
Input Settings:
Comparison Symbol: Enter the ticker of the correlated asset you wish to compare with your current chart.
Examples: If your chart is CME_MINI:NQ1! (Nasdaq E-mini Futures), you might use CME_MINI:ES1! (S&P 500 E-mini Futures) or CME_MINI:YM1! (Dow Jones E-mini Futures).
If your chart is FX_IDC:EURUSD, you might use FX_IDC:GBPUSD (positively correlated) or TVC:DXY (US Dollar Index) (negatively correlated – understanding inverse logic is key here).
Pivot Lookback Left / Right: Defines the number of bars to the left and right that the ta.pivothigh and ta.pivotlow functions will look to determine a pivot on the main chart.
Higher values (e.g., 20) will result in fewer, but potentially more significant, SMT signals.
Lower values (e.g., 5) will result in more frequent, but potentially less reliable, signals.
Time Sync Error (Bars): This crucial parameter allows for slight timing differences between the peaks/troughs of the two assets. It defines how many bars before and after the main chart's pivot point the indicator will search for the extreme price in the comparison symbol.
A value of 3 means it will search within a window of pivot_bar_index ± 3 bars.
Adjust this based on the volatility and correlation strength of the assets you are trading.
Visuals:
Show Bullish SMT / Show Bearish SMT: Toggle visibility of each type of divergence.
Bullish Color / Bearish Color: Customize the line and label colors.
Line Width: Adjust the thickness of the divergence lines.
Usage Tips:
Confluence Tool: SMT Divergence is best used as a confluence factor or confirmation signal, not as a standalone entry signal.
Context is Key: Always combine SMT with your higher timeframe bias, liquidity concepts (e.g., liquidity sweeps), Fair Value Gaps (FVG), Order Blocks (OB), and Market Structure Shifts (MSS).
Timeframes: While applicable on any timeframe, SMT often provides clearer and more reliable signals on higher intraday timeframes (e.g., 15-minute, 1-hour) or daily charts, as lower timeframes can be noisy.
Correlations: Be mindful of the correlation (positive or negative) between your chosen assets.
Positively correlated: NQ vs. ES.
Negatively correlated: EURUSD vs. DXY (A Bullish SMT on EURUSD might mean DXY made a HH while EURUSD made a HL, indicating DXY's strength is fading).
Catatan Rilis
Here is the updated English description for your indicator, now including the Alert functionality. You can use this text for your TradingView publication or documentation.

ICT SMT Divergence (Synced + Alerts)

This is an advanced Smart Money Tool (SMT) indicator designed for Inner Circle Trader (ICT) students. It automatically identifies and highlights structural divergences between two correlated assets (e.g., NQ vs. ES, or EURUSD vs. DXY).

New in v3: Now includes comprehensive Alert Systems so you never miss a setup.

🚀 Key Features

Smart Synchronization (The "Synced" Logic):
Unlike basic indicators that only compare the exact same candle, this script uses a Time Sync Error tolerance. It actively searches for the High/Low of the comparison symbol within a user-defined range (e.g., ±3 bars). This ensures divergences are detected even if the two assets form their highs/lows slightly out of time with each other.

Integrated Alerts:
Receive notifications on your phone, desktop, or via webhook when an SMT Divergence is confirmed.

Bullish SMT Alert: Potential Bottom / Reversal Up.

Bearish SMT Alert: Potential Top / Reversal Down.

Visual Clarity:
Automatically draws dashed lines connecting the divergent points and labels them on the chart (Bullish/Bearish).

⚙️ How It Works

The indicator uses the current chart (the "Driver") to dictate the structure:

It waits for a confirmed Pivot (High or Low) on your current chart.

It then looks at the Comparison Symbol during that same time window.

It compares the structural relationship:

Bearish SMT: Current Asset makes a Higher High, but Comparison Asset makes a Lower High (or vice versa).

Bullish SMT: Current Asset makes a Lower Low, but Comparison Asset makes a Higher Low (or vice versa).

🔔 How to Set Alerts

Add the indicator to your chart.

Click the "Alerts" (Clock) icon in the TradingView toolbar.

Select "ICT SMT Divergence" as the Condition.

Choose your trigger:

SMT Bullish: Trigger only on bottom reversals.

SMT Bearish: Trigger only on top reversals.

Any SMT: Trigger on any divergence.

Frequency: Select "Once per bar close".

⚠️ Important Note on Timing

SMT Divergence is based on Market Structure (Pivots). By definition, a Pivot is only confirmed after a certain number of candles have passed (defined by the Pivot Right setting).

Default: With Pivot Right = 10, the alert will trigger 10 bars after the actual top/bottom occurred.

Adjustment: To get faster alerts (with higher risk of false positives), reduce Pivot Right to 5.

Input Settings

Comparison Symbol: The ticker to compare against (e.g., CME_MINI:ES1! if trading NQ).

Pivot Left / Right: Sensitivity of the structure detection.

Time Sync Error: How many bars "wiggle room" allowed for the comparison asset (Default: 3).

Disclaimer: This tool is for educational purposes only. SMT should be used as a confluence factor within a complete trading strategy, not as a standalone signal to enter a trade.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.