OPEN-SOURCE SCRIPT
Aggiornato Session Highs and Lows Indicator

Session Highs and Lows Indicator
This indicator automatically tracks and displays the High and Low prices for major trading sessions:
London
New York
Asia
New York Close
For each session, it plots:
A label at the highest and lowest price point reached during the session.
A dashed line showing the high and low levels extended to the right (until the current bar), helping traders visualize key support/resistance zones.
You can toggle visibility for each session individually through the settings panel.
Session times are set in GMT+8, but you can adjust them in the code if needed.
Color code:
London: Blue
New York: Red
Asia: Green
New York Close: Orange
All lines and labels are semi-transparent to avoid chart clutter.
Ideal for intraday and session-based trading strategies.
This indicator automatically tracks and displays the High and Low prices for major trading sessions:
London
New York
Asia
New York Close
For each session, it plots:
A label at the highest and lowest price point reached during the session.
A dashed line showing the high and low levels extended to the right (until the current bar), helping traders visualize key support/resistance zones.
You can toggle visibility for each session individually through the settings panel.
Session times are set in GMT+8, but you can adjust them in the code if needed.
Color code:
London: Blue
New York: Red
Asia: Green
New York Close: Orange
All lines and labels are semi-transparent to avoid chart clutter.
Ideal for intraday and session-based trading strategies.
Note di rilascio
OverviewThis indicator tracks and displays the highest high and lowest low of the three major trading sessions (Asia, London, and New York). It draws horizontal lines on the chart to represent these key price levels.
Unlike basic session range indicators, this script ensures that the horizontal lines start exactly at the candle where the high or low wick occurred, and extend a user-defined number of bars into the future.
These levels often act as significant support and resistance zones, making this indicator useful for intraday and short-term swing traders.
Trading Sessions Tracked
The script defines the following trading sessions using the Europe/Zurich timezone:
Asia: 00:00 – 09:00
London: 09:00 – 14:30
New York: 15:30 – 23:00
Each session is processed independently. The indicator finds the high and low of each session and displays the result as a horizontal line.
Features
High and Low detection for Asia, London, and New York sessions
Wick-based positioning: Lines begin at the exact candle that formed the session’s high or low
Customizable line length in number of bars
Toggle visibility for each session individually
Color customization for each session’s lines
Configurable line width
Automatic line cleanup: Previous session lines are removed before new ones are drawn
Inputs
Line Length (Bars): Number of bars the horizontal line extends into the future
Line Width: Thickness of all session lines (1–4)
Session Colors: Color settings for Asia, London, and New York
Visibility Switches: Options to show or hide each individual session
Technical Details
The indicator uses time() with session strings and a timezone to determine whether the current bar belongs to a session.
When a session begins, it initializes the high, low, and their corresponding bar_index.
During the session, it updates the high and low if a new wick surpasses the previous extremes, and saves the bar_index of that bar.
At the end of the session, it draws a horizontal line starting at the exact bar_index where the high or low occurred, and extends it rightward by the number of bars set in the input.
Each new session removes the previous session’s lines to keep the chart clean.
Use Cases
Identifying key intraday support and resistance zones
Anticipating breakouts or rejections at previous session highs/lows
Combining with other indicators (e.g., volume, order flow, VWAP) for confluence
Planning entries, exits, or stop placements based on session ranges
Customization Ideas (Optional Enhancements)
Add session labels (e.g., "London High") at the line start or end
Make line color change dynamically if price breaks through it
Support plotting multiple previous sessions, not just the last one
Add alerts when price touches or breaks a session high or low
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.