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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。