OPEN-SOURCE SCRIPT
已更新 Prev D/W/M + Asia & London Levels [Oeditrades]

Prev D/W/M + Asia & London Levels [Oeditrades]
Author: Oeditrades
Platform: Pine Script® v6
What it does
Plots only the most recent, fully completed:
Previous Day / Week / Month highs & lows
Asia and London session highs & lows
Levels are drawn as true horizontal lines from the period/session start and extended to the right for easy confluence reading. The script is non-repainting.
How it works
Prev Day/Week/Month: Uses completed HTF candles (high[1] / low[1]) so values are fixed for the entire next period.
Sessions (NY time): Asia (default 20:00–03:00) and London (default 03:00–08:00) are tracked in America/New_York time. High/low are locked when the session ends, and the line is anchored at that session’s start.
Inputs & customization
Visibility: toggle Previous Day/Week/Month, Asia, London, and labels.
Colors: highs default red; lows default green (user-configurable). Session highs default pink, lows aqua (also editable).
Style: line style (solid/dotted/dashed) and width.
Sessions: editable time windows for Asia and London (still interpreted in New York time).
Disclaimer: optional on-chart disclaimer panel with editable text.
Notes
Works on any timeframe. For intraday charts, the HTF values remain constant until the next HTF bar completes.
If your market’s overnight hours differ, simply adjust the session windows in Inputs.
Lines intentionally show only the latest completed period/session to keep charts clean.
Use cases
Quick view of PDH/PDL, PWH/PWL, PMH/PML for bias and liquidity.
Intraday planning around Asia/London range breaks, retests, and overlaps with prior levels.
Disclaimer
This tool is for educational purposes only and is not financial advice. Markets involve risk; past performance does not guarantee future results.
Author: Oeditrades
Platform: Pine Script® v6
What it does
Plots only the most recent, fully completed:
Previous Day / Week / Month highs & lows
Asia and London session highs & lows
Levels are drawn as true horizontal lines from the period/session start and extended to the right for easy confluence reading. The script is non-repainting.
How it works
Prev Day/Week/Month: Uses completed HTF candles (high[1] / low[1]) so values are fixed for the entire next period.
Sessions (NY time): Asia (default 20:00–03:00) and London (default 03:00–08:00) are tracked in America/New_York time. High/low are locked when the session ends, and the line is anchored at that session’s start.
Inputs & customization
Visibility: toggle Previous Day/Week/Month, Asia, London, and labels.
Colors: highs default red; lows default green (user-configurable). Session highs default pink, lows aqua (also editable).
Style: line style (solid/dotted/dashed) and width.
Sessions: editable time windows for Asia and London (still interpreted in New York time).
Disclaimer: optional on-chart disclaimer panel with editable text.
Notes
Works on any timeframe. For intraday charts, the HTF values remain constant until the next HTF bar completes.
If your market’s overnight hours differ, simply adjust the session windows in Inputs.
Lines intentionally show only the latest completed period/session to keep charts clean.
Use cases
Quick view of PDH/PDL, PWH/PWL, PMH/PML for bias and liquidity.
Intraday planning around Asia/London range breaks, retests, and overlaps with prior levels.
Disclaimer
This tool is for educational purposes only and is not financial advice. Markets involve risk; past performance does not guarantee future results.
版本注释
Prev D/W/M + Asia & London Levels v2 [Oeditrades]This indicator plots key market structure levels directly on your main chart: the previous Day/Week/Month highs and lows, plus the most recent Asia and London session ranges. It’s designed to be clean, fast, and non‑repainting so you can quickly see where price is interacting with widely watched levels.
The previous period levels (PDH/PDL, PWH/PWL, PMH/PML) are calculated using higher‑timeframe data with lookahead disabled, so they don’t repaint once a period closes. Session ranges track the most recent completed Asia and London sessions on intraday charts, marking each session’s high and low from its actual start to end, then extending forward as reference levels.
You can customize colors for previous period highs/lows separately from session highs/lows, choose line styles and widths, and toggle each level type and labels on or off independently. Session times default to New York time and are fully editable, letting you match your own definition of Asia and London sessions. A compact on‑chart disclaimer can be shown or hidden.
How it works under the hood: the script uses timeframe.change() to detect new periods reliably, clamps drawing coordinates within the visible history buffer to prevent runtime errors, and updates existing lines instead of constantly recreating them to keep the chart responsive. The result is a stable, low‑overhead overlay that won’t get in the way of price action.
Quick start: add the indicator to your chart, keep it on the main price pane (overlay), choose your session times in New York time if you want something different from the defaults, and optionally switch labels or specific level groups on or off. The session levels only appear on intraday timeframes; previous period levels work on any timeframe.
Notes and limitations: the indicator does not generate alerts. Session detection relies on the chart being intraday and the New York timezone setting in the inputs. All levels are for educational reference only and are not trade signals.
版本注释
Fixed Runtime Errors and Vertical lines版本注释
Fixed Runtime Error开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。