PROTECTED SOURCE SCRIPT
已更新

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.
發行說明
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).

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。