OPEN-SOURCE SCRIPT
Key Levels

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.
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.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.