PROTECTED SOURCE SCRIPT
Mis à jour

InitialBalance

55
# Initial Balance Indicator

## Overview

The Initial Balance indicator visualizes the price range (High and Low) established during a specific user-defined session time (e.g., the first hour of the trading day). It plots three key levels:
- **IB High**: The highest price reached during the session.
- **IB Low**: The lowest price reached during the session.
- **IB 50%**: The mid-point between the High and Low.

## Features

- **Custom Session Times**: Users can define the specific start and end times for the Initial Balance period (input as `HHMM`). **Note: Times are fixed to the `America/New_York` timezone.**
- **Real-Time Updates**: The levels dynamically update as the session progresses.
- **Session Independence**: Each trading day/session is treated independently using a struct-based data structure, preserving the historical lines for previous days on the chart.
- **Visual Customization**:
- Customizable colors for High (Green), Low (Red), and Mid (White) lines.
- Customizable background fill color and transparency between the High and Low lines.

## Usage

1. **Add to Chart**: specific the file `InitialBalance.pine` to your TradingView Chart.
2. **Configure Inputs**:
- **Session Settings**: Set your desired `Start Time` and `End Time` (default: 09:30 - 10:30). These times are interpreted in the **America/New_York** timezone.
- **Visual Settings**: Adjust line colors and background fill to your preference.
Notes de version
New Features:
  • Range Label: Added a dynamic label showing the range size in points and percentage. It intelligently positions itself above the High or below the Low depending on which extreme was established first.
  • Price Levels: Added optional labels for High, Low, and Mid prices.
  • Settings: Added inputs to toggle these labels and control the position of price tags (Left vs. Right side).

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.