OPEN-SOURCE SCRIPT
EdgeHunter Levels & Sweeps

EdgeHunter Levels + Sweeps is a multi-timeframe reference level tracker that draws the key highs and lows traders use for context, monitors each level for sweeps in real time using 1-minute resolution, tracks whether a higher timeframe close has reclaimed back inside a swept level, and fires alerts at each stage. All levels, sweep states, and reclaim status are summarised in a live on-chart table.
Levels Tracked
The indicator draws and monitors the following levels simultaneously:
Previous Day High and Low — sourced from the daily timeframe, updated each new session
Previous 1-Hour High and Low — sourced from the 60-minute timeframe, updated each new hour
Previous 4-Hour High and Low — sourced from the 4-hour timeframe, updated each new 4-hour close
Asia Session High and Low — built from a configurable Asia session window (default 20:00–00:00 NY time)
London Session High and Low — built from a configurable London session window (default 02:00–05:00 NY time)
Midnight Open — the opening price of the 00:00 candle in the configured timezone, tracked as a reference level for the trading day
Previous Day Volume Profile Levels — manually entered VAH, VAL, and POC from an external volume profile tool
Each level is drawn from its originating bar and extends forward until swept, at which point the line stops extending and its style switches to dotted to visually indicate it has been taken.
Sweep Detection
All sweep detection runs internally against 1-minute data, regardless of the timeframe the chart is set to. A level is marked swept the moment any 1-minute bar's high crosses above a high level or low crosses below a low level. This ensures sweeps are caught without waiting for a higher timeframe candle to close.
Reclaim Tracking
After a level is swept, the indicator continues monitoring whether price has closed back inside — on a user-selected higher timeframe (configurable, e.g., 1-hour). Each level carries one of three states at any time: Unswept, Outside (swept and the HTF close confirmed outside), or Inside (swept and the HTF close confirmed back inside the level). This reclaim state is what many traders consider confirmation that the sweep was a liquidity grab rather than a genuine directional break.
Status Table
A live table displays every tracked level with its name, current sweep status (SWEPT / UNSWEPT), and current close status relative to the chosen HTF. The table background colour changes to indicate swept levels at a glance. The table position, text size, and colour scheme are fully configurable.
Label Anti-Stacking
When multiple levels are close together in price, labels are automatically staggered vertically to prevent overlap. A configurable minimum separation and step size control how aggressively labels are pushed apart. This keeps the chart readable even when session highs and lows cluster in a narrow range.
Alerts
Three categories of alerts are available:
Level Swept (1m) — fires when any tracked level is crossed using 1-minute precision, naming the level and price
HTF Closed Inside — fires when a previously swept level is reclaimed on the chosen HTF close, indicating a potential false break
VP Level Touch — fires when price touches the manually entered VAH, VAL, or POC, on a per-level or combined basis
All alerts use once per bar close to prevent repeated firing and include the level name and price in the message.
Levels Tracked
The indicator draws and monitors the following levels simultaneously:
Previous Day High and Low — sourced from the daily timeframe, updated each new session
Previous 1-Hour High and Low — sourced from the 60-minute timeframe, updated each new hour
Previous 4-Hour High and Low — sourced from the 4-hour timeframe, updated each new 4-hour close
Asia Session High and Low — built from a configurable Asia session window (default 20:00–00:00 NY time)
London Session High and Low — built from a configurable London session window (default 02:00–05:00 NY time)
Midnight Open — the opening price of the 00:00 candle in the configured timezone, tracked as a reference level for the trading day
Previous Day Volume Profile Levels — manually entered VAH, VAL, and POC from an external volume profile tool
Each level is drawn from its originating bar and extends forward until swept, at which point the line stops extending and its style switches to dotted to visually indicate it has been taken.
Sweep Detection
All sweep detection runs internally against 1-minute data, regardless of the timeframe the chart is set to. A level is marked swept the moment any 1-minute bar's high crosses above a high level or low crosses below a low level. This ensures sweeps are caught without waiting for a higher timeframe candle to close.
Reclaim Tracking
After a level is swept, the indicator continues monitoring whether price has closed back inside — on a user-selected higher timeframe (configurable, e.g., 1-hour). Each level carries one of three states at any time: Unswept, Outside (swept and the HTF close confirmed outside), or Inside (swept and the HTF close confirmed back inside the level). This reclaim state is what many traders consider confirmation that the sweep was a liquidity grab rather than a genuine directional break.
Status Table
A live table displays every tracked level with its name, current sweep status (SWEPT / UNSWEPT), and current close status relative to the chosen HTF. The table background colour changes to indicate swept levels at a glance. The table position, text size, and colour scheme are fully configurable.
Label Anti-Stacking
When multiple levels are close together in price, labels are automatically staggered vertically to prevent overlap. A configurable minimum separation and step size control how aggressively labels are pushed apart. This keeps the chart readable even when session highs and lows cluster in a narrow range.
Alerts
Three categories of alerts are available:
Level Swept (1m) — fires when any tracked level is crossed using 1-minute precision, naming the level and price
HTF Closed Inside — fires when a previously swept level is reclaimed on the chosen HTF close, indicating a potential false break
VP Level Touch — fires when price touches the manually entered VAH, VAL, or POC, on a per-level or combined basis
All alerts use once per bar close to prevent repeated firing and include the level name and price in the message.
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.