OPEN-SOURCE SCRIPT
已更新 Ultra Single Session +Alerts [1CG]

Ultra Single Session +Alerts
Session Range, Trade Windows, and Alerts
Overview
Ultra Single Session +Alerts marks a single trading session on your chart, tracks that session’s high and low, and helps you watch for breaks when price moves away from the session range.
It’s made for traders who want accurate session levels across timeframes, optional trade windows, and alerts that don’t fire outside the times they care about.
Session Display
During the session, the indicator can draw a box to show the session range. It also draws the Session High and Session Low levels. After the session ends, those levels can stay on the chart so you can reference them later.

Sessions
Choose a preset session (London / New York / Asia / cross sessions) or set your own start and end times. Time zone handling is included so the session stays aligned to the clock you expect.
Customization
Most visual elements can be adjusted so it fits your chart:

Line Extensions
You can control how the High/Low lines behave:
Trade Windows
Trade windows are optional time blocks you define. When enabled, the script can mark the window boundaries (and optionally highlight the background) so it’s easy to see when your “allowed trading time” is active.

Alerts
Alerts trigger from breaks of the Session High or Session Low. You can choose one of these modes:
Higher Timeframe Accuracy
To keep the session high/low accurate on higher timeframes, the indicator uses 1-minute data for session tracking. This helps prevent missed highs/lows that can happen when a session starts or ends inside a larger candle.

Daily Sessions
You can also use this for daily session templates (for example midnight-to-midnight, or market open-to-close) to track daily ranges and daily breaks using the same workflow.

Help / Feedback
If you need help setting this up, notice something that looks wrong, or have an idea for improvements, feel free to message me.
Session Range, Trade Windows, and Alerts
Overview
Ultra Single Session +Alerts marks a single trading session on your chart, tracks that session’s high and low, and helps you watch for breaks when price moves away from the session range.
It’s made for traders who want accurate session levels across timeframes, optional trade windows, and alerts that don’t fire outside the times they care about.
Session Display
During the session, the indicator can draw a box to show the session range. It also draws the Session High and Session Low levels. After the session ends, those levels can stay on the chart so you can reference them later.
Sessions
Choose a preset session (London / New York / Asia / cross sessions) or set your own start and end times. Time zone handling is included so the session stays aligned to the clock you expect.
Customization
Most visual elements can be adjusted so it fits your chart:
- Colors for box/lines/background
- Line style (solid/dotted/dashed) and thickness
- Labels (show/hide) and text settings
- Box fill options
- History options (if enabled)
Line Extensions
You can control how the High/Low lines behave:
- Where the lines begin (from price behavior vs from the session start, depending on your settings)
- How far they extend after the session
- Optional “frontrun”/projection behavior (if enabled)
- Optional history display for prior sessions (if enabled)
Trade Windows
Trade windows are optional time blocks you define. When enabled, the script can mark the window boundaries (and optionally highlight the background) so it’s easy to see when your “allowed trading time” is active.
Alerts
Alerts trigger from breaks of the Session High or Session Low. You can choose one of these modes:
- On Break: alerts on the first touch/break of the level.
- Close Out: alerts only when a candle closes beyond the level.
- Close In (Sweep): alerts when price breaks the level but closes back inside the session range.
Trade Window Gating: If trade window gating is enabled, alerts only fire when the break happens inside your trade window(s).
Higher Timeframe Accuracy
To keep the session high/low accurate on higher timeframes, the indicator uses 1-minute data for session tracking. This helps prevent missed highs/lows that can happen when a session starts or ends inside a larger candle.
Daily Sessions
You can also use this for daily session templates (for example midnight-to-midnight, or market open-to-close) to track daily ranges and daily breaks using the same workflow.
Help / Feedback
If you need help setting this up, notice something that looks wrong, or have an idea for improvements, feel free to message me.
- Questions about settings or getting it to match your session times
- Bug reports (please include symbol, timeframe, and your session/trade window settings)
- Interest in a version that supports more sessions
版本注释
Small update to fix an issue with 24/7 instruments not displaying correctly. 开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。