OPEN-SOURCE SCRIPT
Liquidity Sweep Hunter & Targets | AlphaScript

⚡ Liquidity Sweep Hunter & Targets
Tracks the High and Low of the Asia and London sessions, tells you exactly what happened to each level, and plots a risk-defined trade framework when a level is swept during the New York session.
This indicator is an upgrade to the : Session Sweep Detector
🔍 What it does
When a session closes, its High and Low become fixed liquidity levels. The indicator draws each level from the exact candle that printed the extreme and watches it until the same session opens again the next day.
Each level resolves in exactly one of three ways:
⚡ SWEEP — price wicks through the level but the bar closes back on the original side. A liquidity raid: stops were taken, but the level held on a closing basis.
💥 BREAK — a bar closes through the level. This is not a sweep, and the indicator never labels it as one. Breaks are displayed separately (and can be hidden) so the two events are never conflated.
🛡️ Untouched — the level survives its full watch window without either event.
First qualifying event wins: one outcome per level, per session, per day. If a bar both pierces and closes through a level, it counts as a break — a close through the level can never be a sweep.
🎯 NY Sweep Targets
When a session level is swept during the New York session, the indicator plots a risk-defined framework:
-Entry at the sweep bar's close
-Stop beyond the sweep wick or beyond the swept level (your choice), plus a tick buffer
-Four fully configurable R-multiple targets (default 1R / 1.5R / 2R / 3R)
-Optional risk / reward zone shading
A Low swept = bullish framework (targets above); a High swept = bearish (targets below). The targets are risk-multiple geometry measured from your entry and stop — planning levels for trade management, not predictions of where price will go.
📖 How to read the chart
-Solid colored lines are session levels, each starting at the candle that actually made the High or Low, so the line points at the liquidity itself.
-Every level line extends to the same right edge, so the name/price labels line up in a clean column.
-When a level is swept or broken, a tag prints at the event bar marking exactly where it happened.
-Previous sessions' levels remain on the chart as reference, with an option to keep or hide their labels.
⚙️ Settings
-Toggle each level independently (Asia High/Low, London High/Low), with per-session colors and fully configurable session hours (New York time; defaults: Asia 18:00–04:00, London 03:00–12:00).
-Minimum wick penetration filter (in ticks) to ignore marginal pokes when qualifying sweeps. Does not apply to breaks.
-Full control over the target framework: stop anchor, buffer, four R-multiples, line styles, colors, and optional risk/reward fills.
-Control how many previous sessions stay on the chart, whether previous-session labels are shown, and optional transparency for past levels.
🔔 Alerts
Per-level sweep alerts (Asia High/Low, London High/Low), combined "Any Sweep" and "Any Break" alerts, and an "NY Sweep Setup" alert that fires when a target framework is plotted. All alerts fire on the close of the event bar.
📌 Notes and limitations
-Designed for intraday timeframes (1 minute to 30 minutes). On higher timeframes, sessions span too few bars for meaningful detection.
-Session times are defined in New York time (America/New_York) and handle the midnight crossover correctly. If you use another session-levels indicator, match the session hours so both tools agree on where the levels are.
-The target framework is a trade-management and planning tool. Entry, stop, and R-targets are geometry based on the sweep — use your own analysis and risk management to decide whether and how to act on a setup.
-Sweep-vs-break classification depends on your chart timeframe: a wick-through-and-reclaim on a 15m bar may resolve as a break on 1m if an intermediate bar closed beyond the level. Neither reading is wrong — they answer different questions.
✅ Why no repaint
-Events are evaluated on confirmed (closed) bars only. A sweep or break tag will never appear intrabar and then vanish.
-Levels are only armed after their session has fully completed. A session High that is still forming cannot be "swept" — price touching it would simply extend it — so no detection runs until the level is final.
-No request.security() calls are used anywhere. All session tracking is chart-timeframe stat
Tracks the High and Low of the Asia and London sessions, tells you exactly what happened to each level, and plots a risk-defined trade framework when a level is swept during the New York session.
This indicator is an upgrade to the : Session Sweep Detector
🔍 What it does
When a session closes, its High and Low become fixed liquidity levels. The indicator draws each level from the exact candle that printed the extreme and watches it until the same session opens again the next day.
Each level resolves in exactly one of three ways:
⚡ SWEEP — price wicks through the level but the bar closes back on the original side. A liquidity raid: stops were taken, but the level held on a closing basis.
💥 BREAK — a bar closes through the level. This is not a sweep, and the indicator never labels it as one. Breaks are displayed separately (and can be hidden) so the two events are never conflated.
🛡️ Untouched — the level survives its full watch window without either event.
First qualifying event wins: one outcome per level, per session, per day. If a bar both pierces and closes through a level, it counts as a break — a close through the level can never be a sweep.
🎯 NY Sweep Targets
When a session level is swept during the New York session, the indicator plots a risk-defined framework:
-Entry at the sweep bar's close
-Stop beyond the sweep wick or beyond the swept level (your choice), plus a tick buffer
-Four fully configurable R-multiple targets (default 1R / 1.5R / 2R / 3R)
-Optional risk / reward zone shading
A Low swept = bullish framework (targets above); a High swept = bearish (targets below). The targets are risk-multiple geometry measured from your entry and stop — planning levels for trade management, not predictions of where price will go.
📖 How to read the chart
-Solid colored lines are session levels, each starting at the candle that actually made the High or Low, so the line points at the liquidity itself.
-Every level line extends to the same right edge, so the name/price labels line up in a clean column.
-When a level is swept or broken, a tag prints at the event bar marking exactly where it happened.
-Previous sessions' levels remain on the chart as reference, with an option to keep or hide their labels.
⚙️ Settings
-Toggle each level independently (Asia High/Low, London High/Low), with per-session colors and fully configurable session hours (New York time; defaults: Asia 18:00–04:00, London 03:00–12:00).
-Minimum wick penetration filter (in ticks) to ignore marginal pokes when qualifying sweeps. Does not apply to breaks.
-Full control over the target framework: stop anchor, buffer, four R-multiples, line styles, colors, and optional risk/reward fills.
-Control how many previous sessions stay on the chart, whether previous-session labels are shown, and optional transparency for past levels.
🔔 Alerts
Per-level sweep alerts (Asia High/Low, London High/Low), combined "Any Sweep" and "Any Break" alerts, and an "NY Sweep Setup" alert that fires when a target framework is plotted. All alerts fire on the close of the event bar.
📌 Notes and limitations
-Designed for intraday timeframes (1 minute to 30 minutes). On higher timeframes, sessions span too few bars for meaningful detection.
-Session times are defined in New York time (America/New_York) and handle the midnight crossover correctly. If you use another session-levels indicator, match the session hours so both tools agree on where the levels are.
-The target framework is a trade-management and planning tool. Entry, stop, and R-targets are geometry based on the sweep — use your own analysis and risk management to decide whether and how to act on a setup.
-Sweep-vs-break classification depends on your chart timeframe: a wick-through-and-reclaim on a 15m bar may resolve as a break on 1m if an intermediate bar closed beyond the level. Neither reading is wrong — they answer different questions.
✅ Why no repaint
-Events are evaluated on confirmed (closed) bars only. A sweep or break tag will never appear intrabar and then vanish.
-Levels are only armed after their session has fully completed. A session High that is still forming cannot be "swept" — price touching it would simply extend it — so no detection runs until the level is final.
-No request.security() calls are used anywhere. All session tracking is chart-timeframe stat
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Gabriel R. | AlphaScript
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Gabriel R. | AlphaScript
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.