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.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.