OPEN-SOURCE SCRIPT
Five Session by Mach0

Five Session — Customizable Trading Sessions with Opening Range
Overview
Five Session highlights up to five fully customizable trading sessions directly on your chart. Each session is drawn as a box that tracks the session's high and low in real time, with an optional label, Fibonacci retracement levels, and an Opening Range with breakout alerts.
Designed for intraday traders who work with session-based concepts such as the London/New York overlap, Asian range breakouts, or opening range strategies.
Features
- 5 independent sessions — each with its own time window, label, and color. Defaults cover London, New York, Tokyo, and two custom slots, but every session can be freely reconfigured.
- Session boxes — automatically track the high/low of the session as it develops. Choose line style, line width, and background opacity, or hide historical boxes to keep the chart clean.
- Extend modes — keep session levels projected to the right after the session closes ("Extend" or "Extend + End line"), useful for trading reactions to prior-session highs and lows.
- Fibonacci levels (experimental) — plots the 0.382, 0.5, and 0.618 retracement levels of the session range inside each box.
- Opening Range — marks the high/low of the first N minutes of each session (lookback configurable, default 30 minutes) with its own color and style.
- Timezone support — set any timezone (e.g. "America/New_York", "GMT+2") so sessions stay correct regardless of the chart's exchange timezone.
Alerts
- Session started / ended — separate alert conditions for each of the five sessions.
- Opening Range breakout — fires when price closes above the opening range high (bullish) or below the opening range low (bearish) of a session.
- Optional on-chart markers ("Start"/"End" and "Bull"/"Bear") can be toggled in the settings.
Notes
- Works on intraday timeframes from 1 to 60 minutes.
- Session times use the HHMM-HHMM format and support overnight sessions (e.g. 2000-0200).
- Written in Pine Script v6.
This script is for informational and educational purposes only and does not constitute financial advice.
Overview
Five Session highlights up to five fully customizable trading sessions directly on your chart. Each session is drawn as a box that tracks the session's high and low in real time, with an optional label, Fibonacci retracement levels, and an Opening Range with breakout alerts.
Designed for intraday traders who work with session-based concepts such as the London/New York overlap, Asian range breakouts, or opening range strategies.
Features
- 5 independent sessions — each with its own time window, label, and color. Defaults cover London, New York, Tokyo, and two custom slots, but every session can be freely reconfigured.
- Session boxes — automatically track the high/low of the session as it develops. Choose line style, line width, and background opacity, or hide historical boxes to keep the chart clean.
- Extend modes — keep session levels projected to the right after the session closes ("Extend" or "Extend + End line"), useful for trading reactions to prior-session highs and lows.
- Fibonacci levels (experimental) — plots the 0.382, 0.5, and 0.618 retracement levels of the session range inside each box.
- Opening Range — marks the high/low of the first N minutes of each session (lookback configurable, default 30 minutes) with its own color and style.
- Timezone support — set any timezone (e.g. "America/New_York", "GMT+2") so sessions stay correct regardless of the chart's exchange timezone.
Alerts
- Session started / ended — separate alert conditions for each of the five sessions.
- Opening Range breakout — fires when price closes above the opening range high (bullish) or below the opening range low (bearish) of a session.
- Optional on-chart markers ("Start"/"End" and "Bull"/"Bear") can be toggled in the settings.
Notes
- Works on intraday timeframes from 1 to 60 minutes.
- Session times use the HHMM-HHMM format and support overnight sessions (e.g. 2000-0200).
- Written in Pine Script v6.
This script is for informational and educational purposes only and does not constitute financial advice.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。