OPEN-SOURCE SCRIPT
已更新 Tidemark Key Levels

A clean, all-in-one key levels indicator that maps the price reference points institutional traders use to define liquidity. It plots:
Previous and current Day, Week, and Year highs/lows
RTH session Open and Close
Asia and London session highs/lows
All anchored to a single timezone setting so levels stay accurate across instruments
Each level tracks its own state. Once price trades through it, the line fades to a configurable transparency, switches style (solid → dotted by default), and optionally appends a ✕ to its label — giving you an instant visual map of which liquidity pools have already been swept and which are still in play.
The confluence merge engine bundles levels that sit within an ATR-scaled distance of each other into a single line with a combined label (e.g., PDH/Asia H/Lon H), so stacked levels read as one zone instead of three overlapping plots. Current-day, current-week, and current-year highs/lows update live as the period develops and lock in when it closes.
Built with extended-hours data fetching so Asia and London ranges still plot correctly even when the chart is set to RTH-only.
Use it for: liquidity sweep entries, defining HTF context, marking magnet levels for breakout targets, and seeing at a glance whether the session is hunting old liquidity or building toward fresh.
Previous and current Day, Week, and Year highs/lows
RTH session Open and Close
Asia and London session highs/lows
All anchored to a single timezone setting so levels stay accurate across instruments
Each level tracks its own state. Once price trades through it, the line fades to a configurable transparency, switches style (solid → dotted by default), and optionally appends a ✕ to its label — giving you an instant visual map of which liquidity pools have already been swept and which are still in play.
The confluence merge engine bundles levels that sit within an ATR-scaled distance of each other into a single line with a combined label (e.g., PDH/Asia H/Lon H), so stacked levels read as one zone instead of three overlapping plots. Current-day, current-week, and current-year highs/lows update live as the period develops and lock in when it closes.
Built with extended-hours data fetching so Asia and London ranges still plot correctly even when the chart is set to RTH-only.
Use it for: liquidity sweep entries, defining HTF context, marking magnet levels for breakout targets, and seeing at a glance whether the session is hunting old liquidity or building toward fresh.
版本注释
Patch notesTidemark — Key Levels · v1.1 · Accuracy fixes
Bug fixes
RTH Close was off by ~15 points on RTH-only charts. The previous build captured close[1] at the session-end transition, which on an RTH-only chart references a bar across a session gap rather than the true final RTH bar. RTH Close is now tracked continuously during the session and locked in when it ends, so the plotted level is always the real RTH closing price regardless of chart configuration.
RTH Close start anchor also fixed alongside this — line now begins at the actual RTH open bar instead of time[1].
Improvements
Daily, Weekly, and Yearly H/L now respect the "Fetch extended-hours data" setting, matching how Asia and London sessions already worked. With ETH enabled you get true 24-hour H/L; with it disabled you get RTH-only H/L. Previously these levels always used chart-native data, creating an inconsistency where Asia/London were 24h-aware but PDH/PDL were not.
RTH Open and RTH Close intentionally remain on chart-native data — these levels are session-specific by definition, and reading them from the ETH feed would defeat the purpose. Behavior is now documented in code comments.
Updated tooltip on the ETH toggle to clarify which level groups it affects.
No breaking changes. All inputs, colors, and visual behavior are identical. Existing chart layouts will continue to work without reconfiguration.
版本注释
Updated Key Levels logic for better current-day accuracy.Changes in this update:
* Improved Current Day High/Low calculation so CDH/CDL are pulled from the symbol’s actual daily candle instead of being rebuilt only from intraday chart bars.
* Improved Previous Day High/Low accuracy by using the prior daily candle values directly.
* Fixed a visual issue where CDH/CDL could appear slightly off when chart session settings, timezone settings, or visible intraday data did not perfectly match the full trading day.
* Adjusted confluence merging so developing live levels like CDH/CDL are kept exact instead of being hidden or visually blended into nearby levels.
* Current-day levels now update live while keeping the plotted price more consistent with TradingView’s official daily high/low.
* Session levels, sweep detection, labels, styling, and previous week/year levels remain intact.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。