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)
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。