Leviathan Protocol Ultimate Sniper is an overlay indicator that identifies institutional liquidity sweeps, RSI divergences, and support/resistance flip retests.
//@version=6
indicator("Leviathan Protocol [Ultimate Sniper]", overlay=true, max_lines_count=100)
// ==========================================
// 1. GENERAL SETTINGS
// ==========================================
length = input.int(29, "Liquidity Period (Swing)", minval=3)
rsiLen = input.int(14, "RSI Period")
grp_ema = "EMA 200 Settings"
emaLen = input.int(200, "Main EMA Period", group=grp_ema)
futuro = input.int(30, "EMA Future Projection (Candles)", group=grp_ema)
suavizacao = input.int(5, "Inertia Smoothing", group=grp_ema)
grp_filtros = "Visual Filters"
ignorarGaps = input.bool(true, "Ignore GAP Signals (Stocks/Forex)", group=grp_filtros)
mostrarSimples = input.bool(false, "Show Simple Sweeps (No Divergence)", group=grp_filtros)
// ==========================================
// 2. EMA 200 & LASER PROJECTION
// ==========================================
ema200 = ta.ema(close, emaLen)
plot(ema200, color=color.yellow, linewidth=2, title="Real EMA 200")
velocidade = (ema200 - ema200[suavizacao]) / suavizacao
var line linhaProjecao = na
if barstate.islast
line.delete(linhaProjecao)
y_futuro = ema200 + (velocidade * futuro)
linhaProjecao := line.new(x1=bar_index, y1=ema200, x2=bar_index + futuro, y2=y_futuro, color=color.new(color.yellow, 40), width=2, style=line.style_dashed)
// ==========================================
// 3. RSI & DIVERGENCES
// ==========================================
rsi = ta.rsi(close, rsiLen)
// ==========================================
// 4. LIQUIDITY LOGIC & PIVOTS
// ==========================================
ph = ta.pivothigh(high, length, length)
pl = ta.pivotlow(low, length, length)
var float topLiquidity = na
var float bottomLiquidity = na
var float topRsi = na
var float botRsi = na
// Sniper Memory (S/R Flip Retest)
var float brokenSupport = na
var float brokenResistance = na
// Update Main Highs and Lows
if not na(ph)
topLiquidity := high[length]
topRsi := rsi[length]
if not na(pl)
bottomLiquidity := low[length]
botRsi := rsi[length]
plot(topLiquidity, title="Top Liquidity", color=color.new(color.red, 30), linewidth=2, style=plot.style_circles, offset=-length)
plot(bottomLiquidity, title="Bottom Liquidity", color=color.new(color.green, 30), linewidth=2, style=plot.style_circles, offset=-length)
// ==========================================
// 5. BREAKOUT DETECTORS (CRIME SCENE)
// ==========================================
if (close < bottomLiquidity and close[1] >= bottomLiquidity)
brokenSupport := bottomLiquidity
if (close > topLiquidity and close[1] <= topLiquidity)
brokenResistance := topLiquidity
plot(brokenSupport, title="Retest Target (Short)", color=color.new(color.orange, 50), style=plot.style_cross, linewidth=1)
plot(brokenResistance, title="Retest Target (Long)", color=color.new(color.aqua, 50), style=plot.style_cross, linewidth=1)
// ==========================================
// 6. SWEEP & DIVERGENCE TRIGGERS
// ==========================================
isGap = (low > high[1]) or (high < low[1])
sweepUp = (high > topLiquidity and close < topLiquidity) and (not isGap or not ignorarGaps)
sweepDown = (low < bottomLiquidity and close > bottomLiquidity) and (not isGap or not ignorarGaps)
bearDiv = sweepUp and (rsi < topRsi)
bullDiv = sweepDown and (rsi > botRsi)
// ==========================================
// 7. SNIPER TRIGGER: THE RETEST (S/R FLIP)
// ==========================================
retesteBaixa = (high >= brokenSupport) and (close < brokenSupport) and (open < brokenSupport)
retesteAlta = (low <= brokenResistance) and (close > brokenResistance) and (open > brokenResistance)
// ==========================================
// 8. PLOTTING (FIGHTER HUD)
// ==========================================
// Simple Signals (Toggleable)
plotshape(mostrarSimples and sweepUp and not bearDiv and not sweepUp[1], title="Simple Top Sweep", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
plotshape(mostrarSimples and sweepDown and not bullDiv and not sweepDown[1], title="Simple Bottom Sweep", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
// Main Signals (Gold)
plotshape(bearDiv and not bearDiv[1], title="BEAR DIV", location=location.abovebar, color=color.purple, style=shape.labeldown, text="BEAR\nDIV", textcolor=color.white, size=size.small)
plotshape(bullDiv and not bullDiv[1], title="BULL DIV", location=location.belowbar, color=color.teal, style=shape.labelup, text="BULL\nDIV", textcolor=color.white, size=size.small)
// Retest Signals
plotshape(retesteBaixa and not retesteBaixa[1], title="SHORT RETEST", location=location.abovebar, color=color.orange, style=shape.xcross, text="RETEST\nSHORT", textcolor=color.orange, size=size.small)
plotshape(retesteAlta and not retesteAlta[1], title="LONG RETEST", location=location.belowbar, color=color.aqua, style=shape.xcross, text="RETEST\nLONG", textcolor=color.aqua, size=size.small)
// ==========================================
// 9. ALERTS
// ==========================================
alertcondition(bearDiv and not bearDiv[1], title="🔴 SELL (Top)", message="Short Opportunity (Divergence & Sweep)")
alertcondition(bullDiv and not bullDiv[1], title="🟢 BUY (Bottom)", message="Long Opportunity (Divergence & Sweep)")
alertcondition(retesteBaixa and not retesteBaixa[1], title="⚠️ SNIPER ALERT: Short Retest", message="Price retesting broken support. Short Opportunity!")
alertcondition(retesteAlta and not retesteAlta[1], title="⚠️ SNIPER ALERT: Long Retest", message="Price retesting broken resistance. Long Opportunity!")
Overview
Leviathan Protocol Ultimate Sniper plots swing high and low liquidity levels using pivot points and tracks broken levels as retest targets. When price breaches a key level and closes back within the range, the script highlights liquidity sweeps, with an option to filter for RSI divergence. It also plots a 200-period EMA with an inertia-based future projection line. Configurable inputs include swing length, RSI parameters, EMA projection, and gap filtering.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Liquidity Period (Swing)
int
29
length
RSI Period
int
14
rsiLen
Main EMA Period
int
200
emaLen
EMA Future Projection (Candles)
int
30
futuro
Inertia Smoothing
int
5
suavizacao
Ignore GAP Signals (Stocks/Forex)
bool
true
ignorarGaps
Show Simple Sweeps (No Divergence)
bool
false
mostrarSimples
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
An all-in-one overlay indicator that merges a divergence detector, smart money concepts, order blocks, liquidity swings and moving averages. The divergence part checks regular and hidden divergences between price and up to ten oscillators including RSI, MACD,
This indicator collection calculates and plots previous daily high and low price levels on the chart to identify potential supply and demand zones. It includes real-time intraday high and low calculations, RSI divergence detection across a customizable period
Bandz HTF projects higher-timeframe candle structures, ranges, and key levels directly onto the main price chart. It visualizes multiple configurable timeframe lanes from intraday to weekly alongside primary and macro range levels, including 25%, 50%, and 75%
This indicator combines Centered Triangular Moving Average (TMA) bands offset by Average True Range (ATR) with Smart Money Concepts (SMC) market structure analysis on the price chart. It calculates upper, center, and lower bands alongside swing and internal ma
Larper Suite is an overlay indicator for ICT and quarterly-theory analysis. It plots true session, daily, weekly, monthly, and yearly opens plus prior and current high-low liquidity levels. It tracks multi-asset SMT, swing divergence, fair-value-gap fills, and
Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts (SMC) trading strategies. It detects market structure shifts (MSS), breaks of structure (BOS), M5 Fair Value Gaps (FVG), Order Blocks (OB), and Asian session ranges.