OPEN-SOURCE SCRIPT
Sessionscope [Quantum Algo]

Sessionscope is a time-based ICT killzone tool that plots the four primary intraday
killzones, projects the liquidity each one creates, and then measures what happens after
that liquidity is taken. It is built for traders who use Smart Money / ICT concepts and
want session context plus a quantified read on how each killzone behaves on their specific
instrument.
It is not a buy/sell signal system. It is a context and statistics tool.
WHAT IT PLOTS
- Four killzone range boxes, each with its high, low and equilibrium (50%) level.
- Forward-projected session liquidity: each closed killzone's high as buy-side liquidity
(BSL) and its low as sell-side liquidity (SSL).
- Liquidity sweep marks, recolored by outcome (reversal vs continuation).
- The New York midnight open (00:00 ET) as a daily reference line.
- A statistics dashboard summarizing each killzone over the full chart history.
THE FOUR KILLZONES
Default windows, in New York time (America/New_York):
- Asia 20:00 - 00:00
- London Open 02:00 - 05:00
- New York AM 07:00 - 10:00
- London Close 10:00 - 12:00
These are the conventional ICT killzone windows. Because the timezone is anchored to
America/New_York rather than a fixed UTC offset, the windows automatically follow US
daylight saving (EST/EDT) and stay aligned year-round. All four windows, names and colors
are fully editable, so you can shift them, repurpose one (for example to a New York PM or
Silver Bullet window), or adapt the New York window to index timing (08:30 - 11:00) if you
trade futures rather than forex.
SESSION LIQUIDITY (BSL / SSL)
While a killzone is open, the box tracks its developing high and low in real time. When the
killzone closes, those extremes are frozen and projected forward as horizontal liquidity
levels - the high as buy-side liquidity, the low as sell-side liquidity - and extended until
the next instance of that same session. A sweep is registered when price trades through a
projected level (a wick or close beyond the high, or beyond the low). The level can be frozen
at the moment of the sweep to keep the chart clean.
SWEEP OUTCOME ENGINE (the core idea)
Marking a sweep is common. Sessionscope goes further and classifies the outcome of every
sweep:
- High sweep -> REVERSAL if price closes back below the swept high within a configurable
number of bars; otherwise CONTINUATION.
- Low sweep -> REVERSAL if price closes back above the swept low within that window;
otherwise CONTINUATION.
A reversal is the classic ICT liquidity-grab outcome (the level is run, then rejected). A
continuation means the level broke and held (a genuine expansion). Each sweep mark is
recolored to its resolved outcome, and the result feeds the Rev% statistic below. This turns
the qualitative liquidity-grab premise into a measured, per-session number.
NEW YORK MIDNIGHT OPEN
The first traded price after 00:00 America/New_York is captured each day and drawn as a
horizontal reference for that session - a level many ICT traders use as a daily equilibrium
anchor. It is fixed once printed and does not move.
STATISTICS DASHBOARD
For each enabled killzone, accumulated over the entire visible chart history:
- Avg Rng : average high-to-low range of the session, in price.
- xATR : that average range expressed as a multiple of the daily ATR(14), so you can see
which killzone expands most relative to typical daily volatility.
- Swept% : how often the session's liquidity is taken - the share of its high and low
levels that get swept before the session next reopens.
- Rev% : of the sweeps that occurred, how often price reversed back inside the range
(a grab) rather than continuing through (a breakout).
- Bias% : share of sessions that closed above their open (directional tendency).
- n : number of completed sessions in the sample.
Read together, Swept% and Rev% answer two distinct questions: how often does this killzone's
liquidity get run, and when it does, how often does it snap back? Bias% and xATR add the
session's directional lean and its size relative to the day.
HOW IT WORKS (calculation notes)
- Sessions are detected with Pine's time/session function in the chosen timezone; the box
high/low are running extremes of the bars inside each window.
- The daily ATR used for xATR is requested from the 1D timeframe using an offset expression
with lookahead disabled, so it is fully confirmed and constant intraday (no lookahead bias).
- Sweep outcomes are evaluated only on confirmed price relative to fixed, already-closed
levels.
- Statistics are accumulated over the full chart history independently of what is drawn.
- To keep the price scale anchored to current price, only a configurable number of recent
sessions of boxes and levels are kept on the chart (older drawings are removed); this does
not affect the statistics, which always use full history.
WHAT MAKES IT DIFFERENT
Most session and killzone tools stop at colored boxes, session highs/lows, midpoints and a
basic range table. Sessionscope adds the outcome layer: it does not just show that liquidity
was swept, it measures whether each session's sweeps tend to reverse or continue, and colors
them accordingly. The Rev% metric, combined with Swept%, is the part that goes beyond a
standard session-range tool.
SETTINGS
Grouped for clarity: Timezone; Sessions / Killzones (per-session enable, name, window,
color); Box & Level Visuals (boxes, fills, high/low, equilibrium, labels, history cap);
Session Liquidity & Sweeps (projection, sweep marks, freeze-on-sweep, line style, reversal
window, outcome coloring); New York Midnight Open; Statistics Dashboard (position, size);
and Alerts.
HOW TO USE
- Apply on an intraday timeframe; 1m to 1h work best (5m or 15m for clean session structure).
- Mark your higher-timeframe bias first, then use the killzone windows to time entries.
- When a killzone level is swept, read the outcome color and that session's historical Rev%
to gauge whether a reversal back inside the range is the higher-probability path.
- Use xATR to see which session is statistically the most active on your instrument, and
Bias% for its directional lean.
REPAINTING
Boxes and the live high/low update in real time while the current session is forming - this
is expected real-time behavior, not lookahead. Once a session closes, its levels are fixed;
sweeps are detected on price crossing those fixed levels; and an outcome, once resolved on a
closed bar, does not change. No lookahead is used anywhere in the script.
CONCEPTS AND CREDIT
The concepts used here - killzones, buy-side and sell-side liquidity, liquidity sweeps, the
midnight open, and premium/discount equilibrium - originate with the Inner Circle Trader
(Michael J. Huddleston) and the wider Smart Money Concepts / price-action community, where
they are taught and discussed openly. The session window defaults follow the killzone times
commonly used by that community. All code in this script - the session detection, liquidity
projection, sweep-outcome classification and statistics engine - is written independently and
reuses no third-party code. It is published open-source so anyone can read, verify and modify
it under TradingView's House Rules.
DISCLAIMER
This script is provided for educational and informational purposes only. It is not financial,
investment or trading advice, and it does not produce buy or sell recommendations. All
statistics are descriptive measurements of historical data on the current chart and do not
predict future price behavior; past behavior of a session or level does not guarantee future
results. Trading involves substantial risk of loss. You are solely responsible for your own
decisions and risk management. Test any tool thoroughly on your own markets and timeframes
before relying on it.
killzones, projects the liquidity each one creates, and then measures what happens after
that liquidity is taken. It is built for traders who use Smart Money / ICT concepts and
want session context plus a quantified read on how each killzone behaves on their specific
instrument.
It is not a buy/sell signal system. It is a context and statistics tool.
WHAT IT PLOTS
- Four killzone range boxes, each with its high, low and equilibrium (50%) level.
- Forward-projected session liquidity: each closed killzone's high as buy-side liquidity
(BSL) and its low as sell-side liquidity (SSL).
- Liquidity sweep marks, recolored by outcome (reversal vs continuation).
- The New York midnight open (00:00 ET) as a daily reference line.
- A statistics dashboard summarizing each killzone over the full chart history.
THE FOUR KILLZONES
Default windows, in New York time (America/New_York):
- Asia 20:00 - 00:00
- London Open 02:00 - 05:00
- New York AM 07:00 - 10:00
- London Close 10:00 - 12:00
These are the conventional ICT killzone windows. Because the timezone is anchored to
America/New_York rather than a fixed UTC offset, the windows automatically follow US
daylight saving (EST/EDT) and stay aligned year-round. All four windows, names and colors
are fully editable, so you can shift them, repurpose one (for example to a New York PM or
Silver Bullet window), or adapt the New York window to index timing (08:30 - 11:00) if you
trade futures rather than forex.
SESSION LIQUIDITY (BSL / SSL)
While a killzone is open, the box tracks its developing high and low in real time. When the
killzone closes, those extremes are frozen and projected forward as horizontal liquidity
levels - the high as buy-side liquidity, the low as sell-side liquidity - and extended until
the next instance of that same session. A sweep is registered when price trades through a
projected level (a wick or close beyond the high, or beyond the low). The level can be frozen
at the moment of the sweep to keep the chart clean.
SWEEP OUTCOME ENGINE (the core idea)
Marking a sweep is common. Sessionscope goes further and classifies the outcome of every
sweep:
- High sweep -> REVERSAL if price closes back below the swept high within a configurable
number of bars; otherwise CONTINUATION.
- Low sweep -> REVERSAL if price closes back above the swept low within that window;
otherwise CONTINUATION.
A reversal is the classic ICT liquidity-grab outcome (the level is run, then rejected). A
continuation means the level broke and held (a genuine expansion). Each sweep mark is
recolored to its resolved outcome, and the result feeds the Rev% statistic below. This turns
the qualitative liquidity-grab premise into a measured, per-session number.
NEW YORK MIDNIGHT OPEN
The first traded price after 00:00 America/New_York is captured each day and drawn as a
horizontal reference for that session - a level many ICT traders use as a daily equilibrium
anchor. It is fixed once printed and does not move.
STATISTICS DASHBOARD
For each enabled killzone, accumulated over the entire visible chart history:
- Avg Rng : average high-to-low range of the session, in price.
- xATR : that average range expressed as a multiple of the daily ATR(14), so you can see
which killzone expands most relative to typical daily volatility.
- Swept% : how often the session's liquidity is taken - the share of its high and low
levels that get swept before the session next reopens.
- Rev% : of the sweeps that occurred, how often price reversed back inside the range
(a grab) rather than continuing through (a breakout).
- Bias% : share of sessions that closed above their open (directional tendency).
- n : number of completed sessions in the sample.
Read together, Swept% and Rev% answer two distinct questions: how often does this killzone's
liquidity get run, and when it does, how often does it snap back? Bias% and xATR add the
session's directional lean and its size relative to the day.
HOW IT WORKS (calculation notes)
- Sessions are detected with Pine's time/session function in the chosen timezone; the box
high/low are running extremes of the bars inside each window.
- The daily ATR used for xATR is requested from the 1D timeframe using an offset expression
with lookahead disabled, so it is fully confirmed and constant intraday (no lookahead bias).
- Sweep outcomes are evaluated only on confirmed price relative to fixed, already-closed
levels.
- Statistics are accumulated over the full chart history independently of what is drawn.
- To keep the price scale anchored to current price, only a configurable number of recent
sessions of boxes and levels are kept on the chart (older drawings are removed); this does
not affect the statistics, which always use full history.
WHAT MAKES IT DIFFERENT
Most session and killzone tools stop at colored boxes, session highs/lows, midpoints and a
basic range table. Sessionscope adds the outcome layer: it does not just show that liquidity
was swept, it measures whether each session's sweeps tend to reverse or continue, and colors
them accordingly. The Rev% metric, combined with Swept%, is the part that goes beyond a
standard session-range tool.
SETTINGS
Grouped for clarity: Timezone; Sessions / Killzones (per-session enable, name, window,
color); Box & Level Visuals (boxes, fills, high/low, equilibrium, labels, history cap);
Session Liquidity & Sweeps (projection, sweep marks, freeze-on-sweep, line style, reversal
window, outcome coloring); New York Midnight Open; Statistics Dashboard (position, size);
and Alerts.
HOW TO USE
- Apply on an intraday timeframe; 1m to 1h work best (5m or 15m for clean session structure).
- Mark your higher-timeframe bias first, then use the killzone windows to time entries.
- When a killzone level is swept, read the outcome color and that session's historical Rev%
to gauge whether a reversal back inside the range is the higher-probability path.
- Use xATR to see which session is statistically the most active on your instrument, and
Bias% for its directional lean.
REPAINTING
Boxes and the live high/low update in real time while the current session is forming - this
is expected real-time behavior, not lookahead. Once a session closes, its levels are fixed;
sweeps are detected on price crossing those fixed levels; and an outcome, once resolved on a
closed bar, does not change. No lookahead is used anywhere in the script.
CONCEPTS AND CREDIT
The concepts used here - killzones, buy-side and sell-side liquidity, liquidity sweeps, the
midnight open, and premium/discount equilibrium - originate with the Inner Circle Trader
(Michael J. Huddleston) and the wider Smart Money Concepts / price-action community, where
they are taught and discussed openly. The session window defaults follow the killzone times
commonly used by that community. All code in this script - the session detection, liquidity
projection, sweep-outcome classification and statistics engine - is written independently and
reuses no third-party code. It is published open-source so anyone can read, verify and modify
it under TradingView's House Rules.
DISCLAIMER
This script is provided for educational and informational purposes only. It is not financial,
investment or trading advice, and it does not produce buy or sell recommendations. All
statistics are descriptive measurements of historical data on the current chart and do not
predict future price behavior; past behavior of a session or level does not guarantee future
results. Trading involves substantial risk of loss. You are solely responsible for your own
decisions and risk management. Test any tool thoroughly on your own markets and timeframes
before relying on it.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
The institutional Edge: Indicators, Strategies & a Free Academy. quantum-algo.com
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
The institutional Edge: Indicators, Strategies & a Free Academy. quantum-algo.com
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。