Indicators··7 min read

Session Killzone Shading

0 references, link-verifiedEditor of record: Shane CantyStandards review editorial standard · audit log

Session shading identifies the three major currency market sessions (Asia, London, New York) on a chart, with optional highlighting of killzone periods, the quiet opening hours when price consolidates before institutional participation accelerates. This is useful for day traders and swing traders working across time zones who want to identify when volatility typically rises or falls, and for those who trade specific session overlaps or session-start breakouts.

//@version=6
indicator("Session Killzone Shading", overlay=true)

// Enable/disable sessions
show_asia = input(true, "Show Asia Session")
show_london = input(true, "Show London Session")
show_newyork = input(true, "Show New York Session")

// Killzone settings
show_killzone = input(true, "Highlight Killzone")
killzone_mins = input(120, "Killzone Duration (minutes)", minval=0, maxval=480)

// Session times in UTC hours (24-hour format)
asia_open = input(22.0, "Asia Open (UTC hour)", minval=0, maxval=23.99, step=0.25)
asia_close = input(8.0, "Asia Close (UTC hour)", minval=0, maxval=23.99, step=0.25)
london_open = input(8.0, "London Open (UTC hour)", minval=0, maxval=23.99, step=0.25)
london_close = input(17.0, "London Close (UTC hour)", minval=0, maxval=23.99, step=0.25)
newyork_open = input(13.0, "New York Open (UTC hour)", minval=0, maxval=23.99, step=0.25)
newyork_close = input(21.0, "New York Close (UTC hour)", minval=0, maxval=23.99, step=0.25)

// Background colors
color_asia = input(color.new(color.blue, 85), "Asia Color")
color_london = input(color.new(color.orange, 85), "London Color")
color_newyork = input(color.new(color.red, 85), "New York Color")
color_killzone = input(color.new(color.yellow, 80), "Killzone Color")

// Get current time in UTC hours
current_hour = hour + minute / 60.0

// Check if current time falls within a session (handles overnight spans)
f_in_session(curr, open_hour, close_hour) =>
    if open_hour < close_hour
        curr >= open_hour and curr < close_hour
    else
        // Overnight session: check if after open OR before close
        curr >= open_hour or curr < close_hour

// Check if current time is in the killzone (first N minutes of session start)
f_in_killzone(curr, open_hour, close_hour, kz_minutes) =>
    killzone_end = open_hour + kz_minutes / 60.0
    if open_hour < close_hour
        // Normal session: killzone is from open to (open + duration)
        curr >= open_hour and curr < killzone_end
    else
        // Overnight session: killzone ends or wraps to next day
        curr >= open_hour or (curr < close_hour and curr < killzone_end)

// Determine which session (and color) is active
bg_color = na

if show_asia and f_in_session(current_hour, asia_open, asia_close)
    if show_killzone and f_in_killzone(current_hour, asia_open, asia_close, killzone_mins)
        bg_color := color_killzone
    else
        bg_color := color_asia

if show_london and f_in_session(current_hour, london_open, london_close)
    if show_killzone and f_in_killzone(current_hour, london_open, london_close, killzone_mins)
        bg_color := color_killzone
    else
        bg_color := color_london

if show_newyork and f_in_session(current_hour, newyork_open, newyork_close)
    if show_killzone and f_in_killzone(current_hour, newyork_open, newyork_close, killzone_mins)
        bg_color := color_killzone
    else
        bg_color := color_newyork

// Apply shading to background
bgcolor(bg_color)

How the code works

The indicator runs a time comparison at each candle close to determine which session is active in UTC. The f_in_session() function checks whether the current hour falls within the open-to-close range specified for each session. For overnight sessions (where open hour is greater than close hour, such as Asia's 22:00-08:00 UTC), the logic reverses: it returns true if the current time is either after the open OR before the close.

The f_in_killzone() function applies the same session logic but limits the window to the first N minutes of each session. If killzone highlighting is enabled, that interval is shaded in yellow; otherwise, the full session is shaded in its assigned color (blue for Asia, orange for London, red for New York). The default killzone duration is 120 minutes, adjustable via input.

Because the script checks all three sessions and layers them (with later conditions overwriting earlier ones if sessions overlap), the New York check takes precedence if London and New York overlap, and London takes precedence over Asia in their overlap window.

Reading it on a chart

The indicator fills the background with a light tinted color whenever a session is active. A yellow background signals the killzone, the quiet opening phase of a session. This period is typically characterized by lower volatility and tighter ranges as market participants are consolidating from the previous session before the main institutional traders of the current session enter.

Traders often watch for price behavior near session boundaries. A breakout at the moment a new session opens (or as the killzone ends) can signal the beginning of a directional move. Conversely, the overlap periods, such as London's final hour and New York's opening hour, often see increased volatility as both markets overlap. By visually marking these zones, the indicator helps traders avoid or seek volatility depending on their strategy.

Adjusting the session times is useful when the exchange or broker observes daylight saving time differently, or when trading a specific instrument whose primary venue operates outside UTC. The hour inputs accept fractional values (e.g., 8.5 for 08:30 UTC).

Limitations

The script shades the chart based on the assumption that a trader is viewing in UTC. If the chart is set to a different time zone (such as the broker's local time), the shading will be offset and misleading. Always verify the chart's time zone setting against the session input times.

Session times are approximations. The actual opening and closing of currency markets happens at specific times for specific venues (e.g., Tokyo Stock Exchange), but forex markets operate over-the-counter with no single opening bell. The times provided here reflect market convention, not regulatory clock times. Real institutional volume and volatility may differ, especially around economic data releases or central bank announcements, which can override typical session behavior.

The killzone concept assumes that the first 120 minutes (or the input duration) of each session exhibit consolidation before momentum develops. This is a rough generalization. Killzone behavior varies by pair, by season, and by market conditions; it is not a mechanical rule. Gap-fills, news surprises, or geopolitical events can produce sustained volatility from the moment of session open, making the killzone indicator less reliable on volatile trading days.

The indicator does not plot volume or measure volatility directly. It simply shades time intervals. A quiet killzone on the chart does not guarantee narrow price ranges in the current bar; traders must check volatility and volume indicators separately if that is their primary concern.

Finally, overlapping sessions (London–New York, for example) display only the later session's color in the code as written. If a trader needs to distinguish overlaps, a modified version that patterns or labels overlaps rather than replacing them would be necessary.

Key definitions

Killzone: The quiet opening period of a trading session, typically lasting 1-3 hours after market open, during which price consolidates before the full participation of major institutional traders. Not a regulatory term; a practitioner convention.

Session: A defined time window during which a major financial market center conducts trading. Forex sessions are named after their geographic center: Asia (Tokyo/Hong Kong), London, and New York.

UTC (Coordinated Universal Time): The global standard time against which all other time zones are offset. Exchange times are often quoted in UTC or in each venue's local time; for consistency, this indicator requires UTC input.

Overlay indicator: An indicator that plots on top of price bars rather than in a separate pane below the chart.

Repainting: The undesired behavior of an indicator recalculating and redrawing past values when a new bar opens. This script does not repaint because it relies only on hour and minute, which are known at the time of each bar's open.

Volatility: A measure of how much an asset's price fluctuates over a given period. Typically wider ranges and faster movement in active sessions, tighter ranges in quiet periods.

References

  1. CME Group, "FX Market Hours", CME Education. Https://www.cmegroup.com/markets/currencies/fxmarkets.html
  2. Investopedia, "Trading Session", Investopedia Dictionary (accessed 2026). Https://www.investopedia.com/terms/t/tradingsession.asp
  3. Bank for International Settlements, "Triennial Central Bank Survey of Foreign Exchange and Over-the-Counter Derivatives Markets in 2022", BIS (2022). Https://www.bis.org/statistics/rpfx22.htm
  4. Price Action Lab, "Session Analysis and Volatility in Forex Markets", practitioner research (accessed 2026). Generic forex trading methodology.
  5. TradingView Pine Script Documentation, "indicator() function and bgcolor()", TradingView Reference Manual. Https://www.tradingview.com/pine-script-reference/

Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard.

Last reviewed by the PropLedger research pipeline: 2026-10-04. Educational research on historical data, not financial advice.

Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard. Found an error? Email support@prop-ledger.org and the paper is corrected or withdrawn.