OPEN-SOURCE SCRIPT
Liquidity sweep divergence (SMT)

This script implements a refined version of SMT (Smart Money Technique) divergence, focused specifically on liquidity sweeps between correlated assets rather than simple structural divergence.
Use it on one market:
FOREX: EURUSD + DXY (or GBPUSD + DXY)
CRYPTO: BTC+ETH (BTC + TOTAL3, ETH + TOTAL3)
INDICES: ES + NQ
COMMODITIVES: XAU + XAG (GOLD+SILVER)
Unlike traditional SMT indicators that rely on comparing consecutive swing highs/lows (HH/LL logic), this script detects true liquidity events, where one asset takes liquidity (sweeps a previous swing) while the other fails to do so.
🔍 Core Concept
SMT divergence in this script is defined as:
Bearish SMT
The main chart sweeps a previous swing high (liquidity taken)
The second asset fails to sweep its corresponding swing high
Bullish SMT
The main chart sweeps a previous swing low
The second asset fails to do the same
This reflects asymmetry in liquidity behavior, often interpreted as a sign of weakening trend continuation and potential reversal.
⚙️ How It Works
The script uses:
1. Pivot-based swing detection
Uses confirmed pivots (ta.pivothigh / ta.pivotlow)
Eliminates noise and repaint issues from naive fractal logic
2. Cross-asset synchronization
Swings between assets are matched using a configurable bar offset tolerance
Ensures meaningful comparison between structurally aligned points
3. Liquidity sweep detection
Detects when price:
Breaks a previous swing level (high/low)
Optionally closes back inside (ICT-style wick sweep)
4. Signal filtering
To reduce false SMT signals, the script includes:
ATR-based minimum move filter
Optional wick confirmation (true liquidity grab)
No multi-swing brute-force scanning (only relevant structure is used)
🎯 What Makes This Script Unique
Focuses on liquidity sweeps, not just HH/LL divergence
Avoids common SMT noise from weak structural comparisons
Uses minimal and efficient logic (O(1)), no heavy loops
Produces clean and trade-relevant signals, not visual clutter
Designed with algorithmic trading compatibility in mind
📊 Visual Features
Clean SMT labels (Bullish / Bearish)
Optional connecting lines showing the sweep move
Background highlighting for quick contextual awareness
Transparent styling to avoid chart obstruction
⚙️ Inputs
Second Asset – symbol used for SMT comparison
Pivot Length – controls swing sensitivity
Max Sync Offset – allowed mismatch between swing points (in bars)
Wick Sweep Filter – require close back inside level (ICT-style)
ATR Filter – minimum sweep strength
Show Lines – toggle visual connections
🧠 How to Use
This indicator is best used in:
Reversal zones
Liquidity pools (equal highs/lows, prior highs/lows)
Session highs/lows (London / NY)
Typical workflow:
Identify SMT signal
Wait for confirmation:
Break of structure (BOS)
Displacement move
Execute entry in direction of SMT
⚠️ Notes
Signals appear at the moment of liquidity sweep, not at pivot formation
This script is non-repainting, as it uses confirmed pivots
SMT is not a standalone strategy — use with market structure
🌍 Дополнительно (RU — для твоей аудитории)
Этот индикатор реализует правильный SMT, основанный не на HH/LL, а на снятии ликвидности.
Ключевая идея:
Один актив забирает ликвидность (пробивает свинг)
Второй — нет
→ это и есть настоящий SMT
В отличие от большинства индикаторов:
нет мусорных сигналов
нет перебора всех свингов
используется только актуальная структура
Лучше всего работает:
на хаях/лоу сессий
на уровнях ликвидности
в связке с BOS / FVG
Use it on one market:
FOREX: EURUSD + DXY (or GBPUSD + DXY)
CRYPTO: BTC+ETH (BTC + TOTAL3, ETH + TOTAL3)
INDICES: ES + NQ
COMMODITIVES: XAU + XAG (GOLD+SILVER)
Unlike traditional SMT indicators that rely on comparing consecutive swing highs/lows (HH/LL logic), this script detects true liquidity events, where one asset takes liquidity (sweeps a previous swing) while the other fails to do so.
🔍 Core Concept
SMT divergence in this script is defined as:
Bearish SMT
The main chart sweeps a previous swing high (liquidity taken)
The second asset fails to sweep its corresponding swing high
Bullish SMT
The main chart sweeps a previous swing low
The second asset fails to do the same
This reflects asymmetry in liquidity behavior, often interpreted as a sign of weakening trend continuation and potential reversal.
⚙️ How It Works
The script uses:
1. Pivot-based swing detection
Uses confirmed pivots (ta.pivothigh / ta.pivotlow)
Eliminates noise and repaint issues from naive fractal logic
2. Cross-asset synchronization
Swings between assets are matched using a configurable bar offset tolerance
Ensures meaningful comparison between structurally aligned points
3. Liquidity sweep detection
Detects when price:
Breaks a previous swing level (high/low)
Optionally closes back inside (ICT-style wick sweep)
4. Signal filtering
To reduce false SMT signals, the script includes:
ATR-based minimum move filter
Optional wick confirmation (true liquidity grab)
No multi-swing brute-force scanning (only relevant structure is used)
🎯 What Makes This Script Unique
Focuses on liquidity sweeps, not just HH/LL divergence
Avoids common SMT noise from weak structural comparisons
Uses minimal and efficient logic (O(1)), no heavy loops
Produces clean and trade-relevant signals, not visual clutter
Designed with algorithmic trading compatibility in mind
📊 Visual Features
Clean SMT labels (Bullish / Bearish)
Optional connecting lines showing the sweep move
Background highlighting for quick contextual awareness
Transparent styling to avoid chart obstruction
⚙️ Inputs
Second Asset – symbol used for SMT comparison
Pivot Length – controls swing sensitivity
Max Sync Offset – allowed mismatch between swing points (in bars)
Wick Sweep Filter – require close back inside level (ICT-style)
ATR Filter – minimum sweep strength
Show Lines – toggle visual connections
🧠 How to Use
This indicator is best used in:
Reversal zones
Liquidity pools (equal highs/lows, prior highs/lows)
Session highs/lows (London / NY)
Typical workflow:
Identify SMT signal
Wait for confirmation:
Break of structure (BOS)
Displacement move
Execute entry in direction of SMT
⚠️ Notes
Signals appear at the moment of liquidity sweep, not at pivot formation
This script is non-repainting, as it uses confirmed pivots
SMT is not a standalone strategy — use with market structure
🌍 Дополнительно (RU — для твоей аудитории)
Этот индикатор реализует правильный SMT, основанный не на HH/LL, а на снятии ликвидности.
Ключевая идея:
Один актив забирает ликвидность (пробивает свинг)
Второй — нет
→ это и есть настоящий SMT
В отличие от большинства индикаторов:
нет мусорных сигналов
нет перебора всех свингов
используется только актуальная структура
Лучше всего работает:
на хаях/лоу сессий
на уровнях ликвидности
в связке с BOS / FVG
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Телеграм канал с ежедневной аналитикой и сигналами:
👉 t.me/+F73IczJII442NGMy
Самые низкие комиссии для вас на bingX:
👉bingx.com/invite/maniacdt/
Бесплатный альткоин сканнер:
👉 t.me/altcoin_scannerbot
👉 t.me/+F73IczJII442NGMy
Самые низкие комиссии для вас на bingX:
👉bingx.com/invite/maniacdt/
Бесплатный альткоин сканнер:
👉 t.me/altcoin_scannerbot
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Телеграм канал с ежедневной аналитикой и сигналами:
👉 t.me/+F73IczJII442NGMy
Самые низкие комиссии для вас на bingX:
👉bingx.com/invite/maniacdt/
Бесплатный альткоин сканнер:
👉 t.me/altcoin_scannerbot
👉 t.me/+F73IczJII442NGMy
Самые низкие комиссии для вас на bingX:
👉bingx.com/invite/maniacdt/
Бесплатный альткоин сканнер:
👉 t.me/altcoin_scannerbot
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.