OPEN-SOURCE SCRIPT
Leviathan Protocol - Institutional Liquidity & Sweep Sniper

Description:
The Leviathan Protocol is a comprehensive technical analysis tool designed to track institutional liquidity pools, momentum exhaustion (RSI Divergences), and Support/Resistance Flips (Retests).
Most retail traders fall victim to fakeouts by trading raw breakouts. This indicator was built to filter out market noise and identify the precise moments when "Smart Money" captures liquidity to reverse the market.
HOW THE MATH & LOGIC WORKS:
1. Liquidity Zones (Pivots): The script calculates ta.pivothigh and ta.pivotlow based on a 29-period swing to identify major pools of stop-losses. It plots these as dotted Red (Resistance) and Green (Support) lines.
2. Liquidity Sweeps & Divergence: When the price pierces a liquidity line but closes back inside (leaving a wick), it triggers a Sweep. The script then cross-references this action with a 14-period RSI. If a Top Sweep occurs alongside a lower RSI high, it plots a BEAR DIV label. If a Bottom Sweep occurs with a higher RSI low, it plots a BULL DIV label.
3. S/R Flip Retest (Sniper Mode): When a major liquidity line is completely broken by a candle close, the script saves this level in memory using var variables. If the price returns to test this broken support (now resistance) and gets rejected, it plots an Orange Cross (RETEST SHORT). Vice versa for Longs (RETEST LONG).
4. Predictive EMA 200: Plots a 200 EMA and calculates its angular inertia over the last 5 bars to project a dashed line 30 candles into the future, helping to estimate dynamic support/resistance collisions.
FEATURES & SETTINGS:
* Toggle "Ignore GAP Signals" to prevent false divergence readings in traditional markets (Stocks/Forex) where overnight gaps occur.
Disclaimer: This indicator is for educational and analytical purposes only. It does not constitute financial advice. Always combine these signals with Order Flow analysis (e.g., Spot CVD) and proper risk management.
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.
🔱 LeviatanSignals® — automação de fluxo institucional (SMC) para Binance e MEXC Futures. Vídeos, app e mais: leviatansignals.com.br/
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.
🔱 LeviatanSignals® — automação de fluxo institucional (SMC) para Binance e MEXC Futures. Vídeos, app e mais: leviatansignals.com.br/
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.