OPEN-SOURCE SCRIPT

Overnight Time Box

60
Overnight Time Box (22:59 → 09:59, minutes & TZ)

Automatically draws a time-based box for a customizable window that can cross midnight. Perfect for marking the overnight range up to London open (e.g., 22:59–09:59 in Europe/Bucharest), but works with any minute-level window.

What it does

Builds a daily box covering all price action between two user-defined times (e.g., 22:59 → 09:59).

Tracks session High/Low in real time and can plot extended HL lines for reference.

Keeps historical boxes on the chart for backtesting and review (no flicker, no errors).

How to use

Add the script to an intraday chart.

Configure:

Time zone (default: Europe/Bucharest).

Interval (HHMM-HHMM) — e.g., 2259-0959 (minutes supported).

Optional: High/Low lines, fill color, border color, line width.

Use on intraday timeframes (M1–H4).

Note: On Daily/Weekly/Monthly, a heads-up label reminds you it’s designed for intraday use.

Inputs

Time zone: correct DST handling.

Interval (HHMM-HHMM): supports windows that span midnight.

Draw High/Low lines: extended HL guides for the session.

Colors & widths: full visual customization.

Use cases

Mark the overnight range into London open (10:00 RO).

Delimit Killzones / ICT Silver Bullet windows.

Study range, liquidity raids, FVGs before major sessions.

Tech notes

Built on Pine Script v5 using input.session → stable, DST-safe.

Increased max_boxes_count / max_lines_count to preserve history.

Boxes are “frozen” at session end and remain on chart.

Limitations

Intended for intraday only.

One interval per script instance; attach multiple instances for multiple windows.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。