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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
🔱 LeviatanSignals® — automação de fluxo institucional (SMC) para Binance e MEXC Futures. Vídeos, app e mais: leviatansignals.com.br/
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
🔱 LeviatanSignals® — automação de fluxo institucional (SMC) para Binance e MEXC Futures. Vídeos, app e mais: leviatansignals.com.br/
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。