OPEN-SOURCE SCRIPT
Cập nhật Initial Balance | TradeSymmetry

If you trade across multiple asset classes on lower timeframes, you know the frustration: every time you switch from US Equities to Metals or Forex, you have to manually adjust your Initial Balance (IB) timings. Furthermore, standard Multi-Timeframe (MTF) indicators often break, clutter your chart with overlapping text, or randomly delete your Higher Timeframe levels due to Pine Script memory limits.
We engineered the Initial Balance [Smart Auto-Detect] to solve these exact problems. This is a robust, institutional-grade structural tool designed to map the Initial Balance and True Open levels automatically, regardless of what chart you are looking at.
🔥 Core Features & Engineering:
🤖 Smart Asset Auto-Detection
Stop changing your settings every time you change your chart. The built-in detection engine reads your ticker symbol and automatically applies the correct New York (EST/EDT) Initial Balance window:
US Equities / Indices (ES, NQ, SPY, etc.) ➡️ 09:30 - 10:30 EST
Metals & Bonds (GC, SI, ZN, etc.) ➡️ 08:20 - 09:20 EST
Energy (CL, NG, etc.) ➡️ 09:00 - 10:00 EST
Forex & FX Futures (EURUSD, 6E, etc.) ➡️ 08:00 - 09:00 EST (NY Session)
Note: Includes a sleek info panel in the bottom right so you always know which session is active. Manual overrides are also available.
⏱️ Absolute Time Anchoring
A common flaw in Pine Script is that drawn lines will shift horizontally when you switch timeframes (e.g., from 1m to 15m). This script anchors every box, line, and label to exact absolute UNIX timestamps. Your levels stay permanently locked to the exact same pixel, irrespective of the timeframe you are viewing.
🧠 Priority Memory Manager (GC Protection)
TradingView enforces a strict 500-line limit per script. When standard scripts hit this limit, they blindly delete your oldest lines—often ruining your long-term charts. We built a custom Garbage Collection (GC) pruner that constantly monitors line count. If the chart gets too heavy, it safely deletes only the oldest historical days, permanently protecting your current setups.
📊 Included Levels:
We engineered the Initial Balance [Smart Auto-Detect] to solve these exact problems. This is a robust, institutional-grade structural tool designed to map the Initial Balance and True Open levels automatically, regardless of what chart you are looking at.
🔥 Core Features & Engineering:
🤖 Smart Asset Auto-Detection
Stop changing your settings every time you change your chart. The built-in detection engine reads your ticker symbol and automatically applies the correct New York (EST/EDT) Initial Balance window:
US Equities / Indices (ES, NQ, SPY, etc.) ➡️ 09:30 - 10:30 EST
Metals & Bonds (GC, SI, ZN, etc.) ➡️ 08:20 - 09:20 EST
Energy (CL, NG, etc.) ➡️ 09:00 - 10:00 EST
Forex & FX Futures (EURUSD, 6E, etc.) ➡️ 08:00 - 09:00 EST (NY Session)
Note: Includes a sleek info panel in the bottom right so you always know which session is active. Manual overrides are also available.
⏱️ Absolute Time Anchoring
A common flaw in Pine Script is that drawn lines will shift horizontally when you switch timeframes (e.g., from 1m to 15m). This script anchors every box, line, and label to exact absolute UNIX timestamps. Your levels stay permanently locked to the exact same pixel, irrespective of the timeframe you are viewing.
🧠 Priority Memory Manager (GC Protection)
TradingView enforces a strict 500-line limit per script. When standard scripts hit this limit, they blindly delete your oldest lines—often ruining your long-term charts. We built a custom Garbage Collection (GC) pruner that constantly monitors line count. If the chart gets too heavy, it safely deletes only the oldest historical days, permanently protecting your current setups.
📊 Included Levels:
- Initial Balance High & Low (IBH / IBL)
- Intermediate Midpoint (50% / IBM)
- Standard Extensions (IBH+Δ, IBL-Δ)
- Double Extensions (IBH+2Δ, IBL-2Δ)
- Fractional Extensions (IBM+Δ/2, IBM-Δ/2)
Phát hành các Ghi chú
Fix anchoring to 1 minute in intraday timeframesMã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.