OPEN-SOURCE SCRIPT
Zaktualizowano

Session Range Box

674
Generic Session Box

Generic Session Box is a lightweight and customizable tool designed to visualize price ranges within user-defined trading sessions.

This indicator automatically draws a dynamic box that tracks the High and Low formed during a selected session period. The box updates in real time while the session is active and preserves historical session ranges for visual reference and analysis.

🔹 Features
  • Fully customizable session time range
  • Timezone selection support
  • Real-time session High/Low tracking
  • Automatic historical session storage
  • Adjustable maximum number of displayed boxes
  • Customizable box colors and borders
  • Efficient performance and memory management

⚙️ How It Works

The indicator monitors price activity during the selected session and dynamically builds a range box from the session High and Low. Once the session ends, the box is preserved as part of the historical session dataset.

🎯 Typical Use Cases
  • Identifying session volatility zones
  • Monitoring breakout levels
  • Comparing session ranges across days
  • Supporting intraday trading strategies

This tool is intended for visual and analytical purposes only and does not provide trading signals.

━━━━━━━━━━━━━━━━━━━━

🌎 Descripción (Español)

Generic Session Box es una herramienta configurable que permite visualizar el rango de precios generado dentro de sesiones de trading definidas por el usuario.

El indicador dibuja automáticamente una caja que representa el máximo y mínimo alcanzado durante la sesión seleccionada, actualizándose en tiempo real mientras la sesión está activa y conservando el historial de sesiones anteriores.
Informacje o Wersji
Update – Improved Session Box Logic

The session box now includes dynamic state detection and visual feedback based on what happens after the volatility window closes.

New Behavior

  • The box is created during the configured session range.
  • Once the session ends, the box enters a trade validation phase.
  • During this phase the script monitors for a candle closing outside the volatility box.
  • If no breakout occurs before the validity window expires, the box is marked as invalid.


Box States

The box color now reflects its current state:

  • Building – The box is currently forming during the session.
  • Confirmed – The session has ended and the volatility box is locked.
  • Bullish Trade – A candle closes above the box high within the validity window.
  • Bearish Trade – A candle closes below the box low within the validity window.
  • Invalid – No breakout occurs before the validity window expires.


New Inputs

  • Box Building Color
  • Box Confirmed Color
  • Bullish Trade Color
  • Bearish Trade Color
  • Invalid Box Color
  • Trade Validity (minutes) – Defines how long after the session close a breakout remains valid.


Notes

  • Additional features are planned for future iterations.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.