OPEN-SOURCE SCRIPT
Nithin Liquidity Sweep

//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)
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)
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.