OPEN-SOURCE SCRIPT
已更新 Multi-Session Levels (Exclusive Logic)

Overview
Multi-Session Levels (Exclusive Logic) is a specialized technical analysis tool designed for intraday traders who rely on session-based liquidity and reference levels (Highs, Lows, Opens, and Pivots). Unlike standard session indicators that often clutter the chart with overlapping historical data, this script utilizes a custom "Exclusive Display Logic" to ensure that traders only see the most relevant historical context based on the current time of day.
The primary innovation of this script is its context-aware filtering. When a specific market session is active (e.g., London), the script automatically hides that session's own previous day levels to prevent visual "intrusion" or bias. Instead, it projects the locked reference levels of the other major global sessions (Asia and New York) onto the current price action. This allows traders to focus on cross-session liquidity grabs and breakout retests without the distraction of redundant data.
Technical Methodology & Calculations
The script calculates levels based on the official exchange market hours using native timezones to ensure 100% accuracy regardless of the user's local clock:
Asia (Tokyo Stock Exchange): 09:00 - 15:00 JST
London (London Stock Exchange): 08:00 - 16:30 GMT/BST
New York (New York Stock Exchange): 09:30 - 16:00 EST/EDT
Key Calculations:
PSH / PSL (Previous Session High/Low): Uses a state-machine tracking algorithm that captures the absolute high and low of the defined session window. Once the session window closes, these values are "locked" and projected forward to the next relevant trading day.
PSO (Previous Session Open): Captures the open price of the very first bar within the session string.
PSP (Previous Session Pivot): Calculated as the Midpoint $(High + Low) / 2$ of the completed session, serving as a critical mean-reversion level.
Current Session Open: Identifies the real-time opening price of the active session to monitor current-day bias.
How to Use
Identify Liquidity Pools: Use the PSH (Previous Session High) and PSL (Previous Session Low) labels to identify where "buy-side" and "sell-side" liquidity may be resting from previous global sessions.
Monitor Cross-Session Breaks: While trading London, watch how price reacts to the Asia PSH/PSL. A break and retest of these levels often signals a trend continuation or a fake-out (liquidity sweep).
Pivot Midpoints: Use the PSP (Dashed line) as a value area. Price trading above the PSP generally indicates a bullish session bias, while trading below indicates a bearish bias.
Customization: Use the "Visibility" toggles in the settings to isolate specific levels (like just the Open or just the High/Low) depending on your specific trading strategy.
Settings
Market Hours: Users can refine the session strings if they wish to track "Pre-market" or "Electronic Trading Hours" instead of official exchange hours.
Visibility: Toggle PSH, PSL, PSP, and PSO individually.
Styling: Full control over session colors to match your chart theme.
Multi-Session Levels (Exclusive Logic) is a specialized technical analysis tool designed for intraday traders who rely on session-based liquidity and reference levels (Highs, Lows, Opens, and Pivots). Unlike standard session indicators that often clutter the chart with overlapping historical data, this script utilizes a custom "Exclusive Display Logic" to ensure that traders only see the most relevant historical context based on the current time of day.
The primary innovation of this script is its context-aware filtering. When a specific market session is active (e.g., London), the script automatically hides that session's own previous day levels to prevent visual "intrusion" or bias. Instead, it projects the locked reference levels of the other major global sessions (Asia and New York) onto the current price action. This allows traders to focus on cross-session liquidity grabs and breakout retests without the distraction of redundant data.
Technical Methodology & Calculations
The script calculates levels based on the official exchange market hours using native timezones to ensure 100% accuracy regardless of the user's local clock:
Asia (Tokyo Stock Exchange): 09:00 - 15:00 JST
London (London Stock Exchange): 08:00 - 16:30 GMT/BST
New York (New York Stock Exchange): 09:30 - 16:00 EST/EDT
Key Calculations:
PSH / PSL (Previous Session High/Low): Uses a state-machine tracking algorithm that captures the absolute high and low of the defined session window. Once the session window closes, these values are "locked" and projected forward to the next relevant trading day.
PSO (Previous Session Open): Captures the open price of the very first bar within the session string.
PSP (Previous Session Pivot): Calculated as the Midpoint $(High + Low) / 2$ of the completed session, serving as a critical mean-reversion level.
Current Session Open: Identifies the real-time opening price of the active session to monitor current-day bias.
How to Use
Identify Liquidity Pools: Use the PSH (Previous Session High) and PSL (Previous Session Low) labels to identify where "buy-side" and "sell-side" liquidity may be resting from previous global sessions.
Monitor Cross-Session Breaks: While trading London, watch how price reacts to the Asia PSH/PSL. A break and retest of these levels often signals a trend continuation or a fake-out (liquidity sweep).
Pivot Midpoints: Use the PSP (Dashed line) as a value area. Price trading above the PSP generally indicates a bullish session bias, while trading below indicates a bearish bias.
Customization: Use the "Visibility" toggles in the settings to isolate specific levels (like just the Open or just the High/Low) depending on your specific trading strategy.
Settings
Market Hours: Users can refine the session strings if they wish to track "Pre-market" or "Electronic Trading Hours" instead of official exchange hours.
Visibility: Toggle PSH, PSL, PSP, and PSO individually.
Styling: Full control over session colors to match your chart theme.
版本注释
Renamed the text of the each sessions levels. Also added new customization options for each levels
- line color
- line format ( dashed, dotted, straight, etc..)
- Customization of naming of each sessions levels ( Example: Asia Current Open - change to Tokyo CO or Tokyo Current Open or TKY CO etc…)
版本注释
Turned off all other indicators so that the Multi-Session Levels ( Exclusive Logic ) is only visible in the chart. To follow TradingViews guidelines 版本注释
Updating Chart Sorry for inconvenience 版本注释
Fix code so that Each session levels can be turned off and on independently 版本注释
Added new trading session based on US overnight futures session but ( Asia/Globex session)Also added the Tokyo session levels. All levels and lines are completely customizable
版本注释
Updated the session hours for Tokyo and Asia/Globex/ Overnight sessions 版本注释
updating chart so the indicator is visible开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。