OPEN-SOURCE SCRIPT

Nithin Liquidity Sweep

101
//version=6
indicator("Liquidity Sweep Finder", overlay=true, max_labels_count=500)

// Input settings
lookback = input.int(10, "Lookback Bars for High/Low", minval=2)
showHighSweep = input.bool(true, "Show High Sweeps")
showLowSweep = input.bool(true, "Show Low Sweeps")

// Identify recent swing high/low
recentHigh = ta.highest(high, lookback)
recentLow = ta.lowest(low, lookback)

// Sweep conditions
highSweep = showHighSweep and high > recentHigh and close < recentHigh
lowSweep = showLowSweep and low < recentLow and close > recentLow

// Plot signals
plotshape(highSweep, title="High Liquidity Sweep", style=shape.labeldown,
text="Sweep ⬇", location=location.abovebar, color=color.red, size=size.tiny)

plotshape(lowSweep, title="Low Liquidity Sweep", style=shape.labelup,
text="Sweep ⬆", location=location.belowbar, color=color.green, size=size.tiny)

// Highlight background when sweep occurs
bgcolor(highSweep ? color.new(color.red, 85) : na)
bgcolor(lowSweep ? color.new(color.green, 85) : na)

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.