OPEN-SOURCE SCRIPT

Five Session by Mach0

367
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.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.