OPEN-SOURCE SCRIPT

Chart Box Session Indicator [ScrimpleAI]

This indicator allows highlighting specific time sessions within a chart by creating colored boxes to represent the price range of the selected session. Is an advanced and flexible tool for graphically segmenting trading sessions. Thanks to its extensive customization options and advanced visualization features, it allows traders to gain a clear representation of key market areas based on chosen time intervals.

The indicator offers two range calculation modes:
- Body to Body: considers the range between the opening and closing price.
- Wick to Wick: considers the range between the session's low and high.

Key Features
1. Session Configuration
- Users can select the time range of the session of interest.
- Option to choose the day of the week for the calculation.
- Supports UTC timezone selection to correctly align data.

2. Customizable Visualization
- Option to display session price lines.
- Ability to show a central price line.
- Extension of session lines beyond the specified duration.

3. Graphical Display Configuration
- Three different background configurations to suit light and dark themes.
- Two gradient modes for session coloring:
- Centered: the color is evenly distributed.
- Off-Centered: the gradient is asymmetrical.

How It Works
The indicator determines whether the current time falls within the selected session, creating a colored box that highlights the corresponding price range.
Depending on user preferences, the indicator draws horizontal lines at the minimum and maximum price levels and, optionally, a central line.

During the session:
- The lowest and highest session prices are dynamically updated.
- The range is divided into 10 bands to create a gradient effect.
- A colored box is generated to visually highlight the chosen session.

If the Extend Lines option is enabled, price lines continue even after the session ends, keeping the range visible for further analysis.

Usage
This indicator is useful for traders who want to analyze price behavior in specific timeframes. It is particularly beneficial for strategies based on market sessions (e.g., London or New York open) or for identifying accumulation and distribution zones.

Clause de non-responsabilité