OPEN-SOURCE SCRIPT

Key Levels

361
What it does
It plots your key liquidity reference levels on NQ/ES/YM, all on a New York clock (America/New_York, auto EST/EDT), built for intraday timeframes. Every level is a horizontal line extended right with a right-margin label, so labels stay readable on any timeframe and don't squeeze the price scale.
Levels plotted

Sessions — Asia (18:00–02:29), London (02:30–06:59), NY AM (07:00–11:29). Each plots that session's high and low. They belong to the current trading day; at the close they clear off the chart and move to history.
NY Midnight Open (NYMO) — the 00:00 ET open.
9:30 Open — the cash-open price, now pulled from 30-minute data so it reads correctly on every timeframe (1H and higher included).
Prior Day H/L (PDH/PDL) — the trading day runs 18:00 → 16:59 next day, finalized at the close so it's visible all weekend. Keeps the last 3 days. Swept levels relabel "old" and switch to dashed.
Prior Week H/L (PWH/PWL) — Sunday 18:00 → Friday 16:59. Keeps the last 3 weeks. Same sweep relabel/dash behavior.

Trading-day logic
Everything rolls on the trading day (18:00 boundary, +6h shift), not the calendar day, and the weekend gap is handled so Friday's levels finalize correctly.
Backtesting / history
A "Show current day" toggle plus individual "Show N days back" toggles (1–5) let you bring archived session/anchor days back onto the chart one at a time. With current-day off during market close, the recent day's PD/PW previews now clear too.
Settings
Per-level color inputs (each controls both line and label), show/hide per level, and a global line width. NYMO and 9:30 default to black — recolor those for a dark chart.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.