OPEN-SOURCE SCRIPT
Telah dikemas kini Liquidity Sweep Reversal & Continuation

A liquidity-sweep detector that classifies each sweep into a Reversal or Continuation setup, with a live dashboard and built-in entry signals.
Overview
This indicator tracks recent swing highs and lows as active liquidity levels — the pools of resting stop orders that tend to sit just beyond obvious structure. When price wicks beyond one of those levels and closes back inside it, that's flagged as a liquidity sweep (a stop hunt), and the level is removed from tracking since it's been used.
What makes a sweep useful for trading is context: the same sweep can mean two very different things depending on the broader trend.
A sweep against the prevailing higher-timeframe trend is treated as a Reversal setup — often a sign of exhaustion or a stop-hunt marking a turn.
A sweep with the prevailing higher-timeframe trend is treated as a Continuation setup — a shakeout before the trend resumes.
How it works
Liquidity levels — pivot-based swing highs/lows are plotted as dashed lines and tracked until swept.
Sweep detection — a wick beyond a level followed by a close back inside it triggers a sweep event.
Confirmation filters (all optional/toggleable):
Displacement candle — requires real conviction in the sweep candle's body, measured against ATR.
Volume spike — requires above-average participation on the sweep.
Follow-through confirmation — waits for price to break beyond the sweep candle's high/low within a configurable number of bars before actually firing a signal, rather than firing on the wick alone.
Trend context — an EMA-based bias, either local or from a higher timeframe, determines whether a confirmed sweep gets classified as Reversal or Continuation.
Signal quality grading — each fired signal is graded High/Medium/Low based on how many confirmation factors (displacement, volume, ADX alignment) lined up.
Dashboard
Shows the current trend context, the most recent sweep and its price level, whether a signal is currently pending follow-through confirmation, ADX/volume readings, the last signal fired and its quality grade, and running daily counts of reversal vs. continuation signals by direction.
Inputs
Every stage is configurable: pivot lookback and max tracked levels, trend context source (local EMA or HTF EMA) and timeframe, displacement/volume/follow-through confirmation toggles and thresholds, ADX length and trend-strength threshold, and dashboard placement/size.
How to use it
This is a discretionary tool for reading liquidity-driven price action, not a standalone automated system:
Use the Trend Context row to understand what a fresh sweep would mean before it happens.
Treat Reversal signals as higher-risk, contrarian setups — they work best with strong confirmation (high signal quality, ADX alignment) rather than on the wick alone.
Treat Continuation signals as lower-risk, trend-following setups — a shakeout in the direction of the existing trend.
Use the Signal Quality grade to filter out weaker setups rather than acting on every marker.
As with any price-action tool, sweep frequency and quality vary significantly by instrument, timeframe, and the pivot/confirmation settings chosen — backtest and forward-test before trading it live.
Concepts used
This script implements the widely-used "liquidity sweep" / stop-hunt concept found across smart-money and price-action trading methodologies — the idea that price often trades just beyond obvious swing highs/lows to trigger resting stop orders before reversing or continuing. The pivot detection, sweep logic, confirmation filters, trend-context classification, and dashboard are an original implementation built specifically for this script.
Disclaimer
This script is provided for educational and informational purposes only and does not constitute financial advice. Trading involves substantial risk of loss and is not suitable for all investors. Past performance of any setup or strategy does not guarantee future results. Always do your own research and risk management before trading.
Overview
This indicator tracks recent swing highs and lows as active liquidity levels — the pools of resting stop orders that tend to sit just beyond obvious structure. When price wicks beyond one of those levels and closes back inside it, that's flagged as a liquidity sweep (a stop hunt), and the level is removed from tracking since it's been used.
What makes a sweep useful for trading is context: the same sweep can mean two very different things depending on the broader trend.
A sweep against the prevailing higher-timeframe trend is treated as a Reversal setup — often a sign of exhaustion or a stop-hunt marking a turn.
A sweep with the prevailing higher-timeframe trend is treated as a Continuation setup — a shakeout before the trend resumes.
How it works
Liquidity levels — pivot-based swing highs/lows are plotted as dashed lines and tracked until swept.
Sweep detection — a wick beyond a level followed by a close back inside it triggers a sweep event.
Confirmation filters (all optional/toggleable):
Displacement candle — requires real conviction in the sweep candle's body, measured against ATR.
Volume spike — requires above-average participation on the sweep.
Follow-through confirmation — waits for price to break beyond the sweep candle's high/low within a configurable number of bars before actually firing a signal, rather than firing on the wick alone.
Trend context — an EMA-based bias, either local or from a higher timeframe, determines whether a confirmed sweep gets classified as Reversal or Continuation.
Signal quality grading — each fired signal is graded High/Medium/Low based on how many confirmation factors (displacement, volume, ADX alignment) lined up.
Dashboard
Shows the current trend context, the most recent sweep and its price level, whether a signal is currently pending follow-through confirmation, ADX/volume readings, the last signal fired and its quality grade, and running daily counts of reversal vs. continuation signals by direction.
Inputs
Every stage is configurable: pivot lookback and max tracked levels, trend context source (local EMA or HTF EMA) and timeframe, displacement/volume/follow-through confirmation toggles and thresholds, ADX length and trend-strength threshold, and dashboard placement/size.
How to use it
This is a discretionary tool for reading liquidity-driven price action, not a standalone automated system:
Use the Trend Context row to understand what a fresh sweep would mean before it happens.
Treat Reversal signals as higher-risk, contrarian setups — they work best with strong confirmation (high signal quality, ADX alignment) rather than on the wick alone.
Treat Continuation signals as lower-risk, trend-following setups — a shakeout in the direction of the existing trend.
Use the Signal Quality grade to filter out weaker setups rather than acting on every marker.
As with any price-action tool, sweep frequency and quality vary significantly by instrument, timeframe, and the pivot/confirmation settings chosen — backtest and forward-test before trading it live.
Concepts used
This script implements the widely-used "liquidity sweep" / stop-hunt concept found across smart-money and price-action trading methodologies — the idea that price often trades just beyond obvious swing highs/lows to trigger resting stop orders before reversing or continuing. The pivot detection, sweep logic, confirmation filters, trend-context classification, and dashboard are an original implementation built specifically for this script.
Disclaimer
This script is provided for educational and informational purposes only and does not constitute financial advice. Trading involves substantial risk of loss and is not suitable for all investors. Past performance of any setup or strategy does not guarantee future results. Always do your own research and risk management before trading.
Nota Keluaran
What's new in this updateSession tracking on the dashboard — shows which trading session you're currently in (NY Open, NY PM, London, Lunch, Asian, or Off-Hours), color-coded by typical signal reliability for that window.
Automatic Off-Hours quality downgrade — signals firing during the lowest-volume window of the day (roughly 5–9:30am and 4–8pm ET) are now automatically graded one tier lower on the Signal Quality row, so the grade reflects real conditions rather than just the raw confirmation count. Toggleable.
RSI added to the dashboard — value, state (Overbought/Oversold/Neutral), and directional bias, for additional momentum context alongside ADX.
Improved dashboard readability — all label text now renders in white on a readable background, fixing a contrast issue where labels could be difficult to read against certain chart themes.
A bar-0 array indexing bug in the liquidity-level line drawing was also fixed.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.