OPEN-SOURCE SCRIPT
Sessions with Opening/Closing, Multi timeframe

Sessions with Opening & Closing is a simple and lightweight TradingView indicator that automatically marks the opening and closing moments of the major trading sessions directly on your chart.
It visually highlights:
Asian Session
European Session
U.S. Session
Each session opening and closing is shown with:
A vertical line on the exact candle where the session starts or ends
A label showing the session name and whether it is an Open or Close
This helps traders easily identify session transitions, which are often associated with changes in liquidity, volatility, and market behavior.
How It Works
The script checks whether the current candle falls inside a predefined session time range based on a selected time zone.
When the session state changes:
From inactive → active → it draws an Open marker
From active → inactive → it draws a Close marker
This is done for each session independently (Asia, Europe, USA), so you can clearly see when one session starts or ends relative to the others.
The indicator does not repaint and uses only confirmed candle information.
Sessions Used (default)
These are the default session times (you can change them in the code):
Asia: 19:00 – 01:00
Europe: 02:00 – 10:00
USA: 09:30 – 16:00
All times are interpreted according to the selected time zone.
How to Change the Time Zone
At the top of the script you will find this line:
tz = "America/La_Paz"
To change the time zone, simply replace "America/La_Paz" with your desired zone.
Examples:
tz = "America/New_York" // New York
tz = "Europe/London" // London
tz = "Asia/Tokyo" // Tokyo
tz = "Australia/Sydney" // Sydney
tz = "UTC" // Coordinated Universal Time
TradingView uses standard IANA time zone names.
You can find the full list here: en.wikipedia.org/wiki/List_of_tz_database_time_zones
Who Is This Indicator For?
This indicator is useful for:
Session-based traders
Liquidity traders
Forex, indices, and crypto traders
Anyone who wants to understand when major market sessions begin and end
Final Notes
Works on all timeframes.
Does not repaint.
Can be used on Forex, Crypto, Indices, and Futures.
Fully customizable (sessions, colors, labels, and time zone).
If you like this indicator or find it useful, feel free to like it or leave feedback — and happy trading! 🚀📈
It visually highlights:
Asian Session
European Session
U.S. Session
Each session opening and closing is shown with:
A vertical line on the exact candle where the session starts or ends
A label showing the session name and whether it is an Open or Close
This helps traders easily identify session transitions, which are often associated with changes in liquidity, volatility, and market behavior.
How It Works
The script checks whether the current candle falls inside a predefined session time range based on a selected time zone.
When the session state changes:
From inactive → active → it draws an Open marker
From active → inactive → it draws a Close marker
This is done for each session independently (Asia, Europe, USA), so you can clearly see when one session starts or ends relative to the others.
The indicator does not repaint and uses only confirmed candle information.
Sessions Used (default)
These are the default session times (you can change them in the code):
Asia: 19:00 – 01:00
Europe: 02:00 – 10:00
USA: 09:30 – 16:00
All times are interpreted according to the selected time zone.
How to Change the Time Zone
At the top of the script you will find this line:
tz = "America/La_Paz"
To change the time zone, simply replace "America/La_Paz" with your desired zone.
Examples:
tz = "America/New_York" // New York
tz = "Europe/London" // London
tz = "Asia/Tokyo" // Tokyo
tz = "Australia/Sydney" // Sydney
tz = "UTC" // Coordinated Universal Time
TradingView uses standard IANA time zone names.
You can find the full list here: en.wikipedia.org/wiki/List_of_tz_database_time_zones
Who Is This Indicator For?
This indicator is useful for:
Session-based traders
Liquidity traders
Forex, indices, and crypto traders
Anyone who wants to understand when major market sessions begin and end
Final Notes
Works on all timeframes.
Does not repaint.
Can be used on Forex, Crypto, Indices, and Futures.
Fully customizable (sessions, colors, labels, and time zone).
If you like this indicator or find it useful, feel free to like it or leave feedback — and happy trading! 🚀📈
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.