Editors' picks
OPEN-SOURCE SCRIPT
Updated

ICT Killzones + Pivots [TFO]

1 329 590
Designed with the help of TTrades and with inspiration from the ICT Everything indicator by coldbrewrosh, the purpose of this script is to identify ICT Killzones while also storing their highs and lows for future reference, until traded through.

snapshot

There are 5 Killzones / sessions whose times and labels can all be changed to one's liking. Some prefer slight alterations to traditional ICT Killzones, or use different time windows altogether. Either way, the sessions are fully customizable. The sessions will auto fit to keep track of the highs and lows made during their respective times, and these pivots will be extended until they are invalidated.

There are also 4 optional Open Price lines and 4 vertical Timestamps, where the user can change the time and style of each one as well.

snapshot

To help maintain a clean chart, we can implement a Cutoff Time where all drawings will stop extending past a certain point. The indicator will apply this logic by default, as it can get messy with multiple drawings starting and stopping throughout the day at different times.

snapshot

Given the amount of interest I've received about this indicator, I intend to leave it open to suggestions for further improvements. Let me know what you think & what you want to see added!
Release Notes
Added a Timeframe Limit to avoid cluttering higher timeframe charts. If the current chart timeframe is above that which is selected in the indicator settings, nothing will be drawn (lines, labels, etc.). Lower, intraday timeframes are best for this indicator
Release Notes
- Added Day/Week/Month separators
- Added Day/Week/Month open lines
- Added a drawing limit to keep charts uncluttered
Release Notes
- Minor bug fix regarding the Show Killzone Boxes option
- Attempted to clarify certain setting names
Release Notes
- Added optional alerts to all session highs and lows
- Bug fixes
Release Notes
- Bug fixes
Release Notes
- Added Day of Week labels, with options to display at Midnight or Midday
- Added the option to enable/disable Killzone Pivots (note pivots must still be enabled when creating alerts)
- Added the option to enable/disable Pivot Labels, instead of toggling the Labels for each individual Killzone
Release Notes
Bug fix: Day of Week labels weren't turning off when toggling the setting
Release Notes
As a huge thank you for hitting 10k boosts on TradingView, the following updates have been made:

- Options to extend killzone pivots past mitigation, either for just the most recent sessions or for all sessions on the current chart
- Option to show a table of range sizes for the most recent killzones, as well as range averages
- Option to show midpoint lines of all selected killzones
- Option to show previous Day/Week/Month highs and lows
- Added New York as a timezone option, in addition to GMT options (no need to switch for daylight savings)
- Added Sunday day of week labels

I completely revamped the code in order to support these updates, so if you spot any issues, please reach out! Thanks again for 10k!
Release Notes
Fixed table colors on dark chart layouts
Release Notes
Option to have unlimited opening price lines, as opposed to using to the session limit
Release Notes
- Added back the Text Color option
- Fixed Killzone Midpoint line width
Release Notes
Fixed the text transparency of Killzone boxes
Release Notes
As a thank you for reaching 15k boosts, the following updates have been made!

- Alerts for D/W/M highs and lows
- Pivot labels on the right, with options to show price
- Doubled the amount of opening prices from 4 to 8
- Option to hide Saturday/Sunday labels
- Ability to delete old timestamps
Release Notes
Bug fixes and better default setting for new users
Release Notes
Added an option to stop midpoint extension upon mitigation
Release Notes
Bug fix: pivot lines were not extending for sessions that were still active/developing
Release Notes
Bug fixes regarding pivot alerts and midpoint extensions
Release Notes
To celebrate 50k boosts and recently ranking the #10 most boosted indicator on all of TradingView, this is the largest update since the indicator's initial release: a statistics engine for the levels you already use, previously fixed inputs made fully configurable, and a settings menu reorganized around core features.

**Note for existing users:** the settings menu was rebuilt, so previously saved settings will largely reset to defaults — most notably, Opening Prices and Timestamps now use a new text-based format (described below) and will need to be re-entered once.

New: Range Levels

Levels plotted above and below each killzone's session opening price at user-defined multiples of a selected Range Measurement: `session open ± multiplier × measurement`, applied per side.

- **Range Measurement options:** *Average / Median* — computed from each killzone's completed session ranges (high − low) over the Data Lookback. *Standard Deviation* — computed from price's displacement from the session open (close − session open), sampled on every bar and pooled over the last N completed sessions, measuring how far price actually travels from the open — the quantity the levels project.
- **Level labels carry the measurement type** (`+0.5σ`, `+0.5 avg`, `+0.5 med`) so a multiplier is never ambiguous.
- **Configuration is one line per level** as `Multiplier, Color` (e.g. `0.5` or `1.5, purple`). Levels inherit their killzone's color unless a per-line color overrides it; lines starting with `//` are ignored.
- **Levels are snapshots:** fixed at each session's open using the measurement value at that moment and never redrawn — hit statistics accrue against those exact prices.
- **Every level tracks its own hit rate.** Hover a level label for its price, date, percentage of sessions hit, and the calculation basis. Hits are only counted during the level's own session.

Range Levels are off by default — enable "Show Range Levels" in the Range Data & Levels group.

Data table overhaul

The range table is now a statistics table with three independently toggled stat groups:

- **Pivot Stats** — how often each killzone's high and low get hit after the session ends.
- **Range Level Stats** — one column per multiplier with hit rates above and below the session open.
- **D/W/M Stats** — rows for the previous day, week, and month with the current period's range and previous high/low hit rates.
- Cells highlight in their killzone's (or timeframe's) color when that level was hit during the current session/period. Every stat cell's tooltip includes the hit rate, sample size, how far back the data reaches, and a 🟩🟥 history of recent events.
- Cells show `-` until enough history has accumulated, and a stat group hides when its underlying feature is disabled.

Hit-rate statistics on chart labels

Killzone pivot, range level, and previous day/week/month high/low labels now carry tooltips with the level's name, price, date, and historical hit rate (e.g. "45% hit rate over 20 days"). Opening price, D/W/M open, and midline labels carry name/price/date tooltips.

Day / Week / Month improvements

- **Midlines:** optional midpoint line of the previous period's range (PDM / PWM / PMM), per timeframe.
- **History modes:** Most Recent, Session Limit, or Unlimited.
- **Label de-overlap:** labels at exactly the same price merge into one — e.g. "D OPEN / W OPEN" on the first day of a week — and separate automatically once prices diverge.

Opening Prices and Timestamps: new text-based format

The fixed slots (8 opening price lines, 4 timestamps) are replaced by free-form text areas with no limit on entries:

- **Opening Prices:** one entry per line as `Time, Color, Label`, e.g. `0930, red, NY Open` — color and label optional. **Timestamps:** one entry per line as `Time, Color`.
- Times are flexible (`0930`, `930`, `09:30`); colors accept all Pine named colors or hex codes. Lines starting with `//` are ignored.
- Both features gained master show/hide toggles and the same history modes as above.
- If any line can't be read, a "⚠ Settings" indicator appears in the bottom-right corner; its tooltip states which feature has unreadable entries and restates the expected format — nothing fails silently.

Killzones

- A **sixth killzone slot** was added (preset to RTH 0930-1600, disabled by default).
- Killzone boxes are now clean color-only ranges; transparency is set directly in the color picker. Pivot labels derive from the killzone's name, so renaming a killzone renames its labels.

Consistency and polish

- Settings are reorganized by feature, and every major input carries a tooltip explaining its behavior — including each text area's format.
- Labels wear their line's color, and all text follows the chart's color theme.
- The Drawing Cutoff Time now consistently stops killzone pivots, midpoints, opening price lines, and range levels. It deliberately does not apply to Day/Week/Month lines, which stay relevant across their whole period; pivot hit-rate accounting also freezes at the cutoff.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.