OPEN-SOURCE SCRIPT
업데이트됨 Weekly Initial Balance

This indicator marks the Weekly Initial Balance — the price range established during the first two trading days of the week — and projects extension levels for the remainder of the week.
The idea behind it
Monday sets the opening range for the week. Tuesday may extend that range — it could produce a false break, a range extension, a reversal, or an inside day. In a large majority of weeks, by the time Monday and Tuesday have traded, the high and low extremes are already in place for the rest of the week. One of these extremes will tend to hold, while the other may get broken.
The default window (Sunday 18:00 – Tuesday 16:00 New York time) captures exactly this: the full Monday session plus Tuesday's contribution. Once the IB window closes, the remaining days of the week tend to trade in relation to these established levels.
What makes this different
Most Initial Balance indicators focus on the first 30 or 60 minutes of a single session. This indicator applies the IB concept to the weekly timeframe — capturing the Mon-Tue range that statistically defines the week's extremes. The configurable window, range extension multipliers, and clean label handling (current week only) make it a practical tool rather than a theoretical overlay.
How it works
- A shaded box marks the IB range (high and low) as it forms during the configured window
- After the window closes, the IB high, low, and 50% midpoint extend as horizontal reference levels
- Configurable range extensions (default 0.5x and 1.0x of the IB range) project above and below as potential targets
- Price labels display the exact level at each line (current week only — historical weeks show clean lines without clutter)
How to use it
- **Which side holds?** After the IB window closes, one extreme tends to hold for the week while the other gets broken — watch for which side price tests and rejects first
- **Range extensions as targets:** When the IB high or low breaks, the 0.5x and 1.0x extensions provide measured-move targets
- **Inside weeks:** If price stays within the IB range through Friday, the 50% midpoint often acts as a magnet
- **Volatility read:** A wide Monday–Tuesday range suggests the week's extremes may already be set; a narrow range suggests expansion is still ahead
- **Alerts:** Built-in alerts fire when price breaks the IB high or low after the window closes
Settings
- Fully configurable start/end day, hour, and minute (New York time)
- Adjustable number of historical weeks to display
- Configurable extension multipliers (not limited to 0.5x and 1.0x)
- Toggle individual levels, labels, and extensions on/off
- Works on any instrument with sufficient intraweek data (futures, forex, crypto)
Recommended timeframes: 30min and 1H charts for best visual clarity. Intraday only — the indicator requires sufficient chart history to display the configured number of weeks.
The idea behind it
Monday sets the opening range for the week. Tuesday may extend that range — it could produce a false break, a range extension, a reversal, or an inside day. In a large majority of weeks, by the time Monday and Tuesday have traded, the high and low extremes are already in place for the rest of the week. One of these extremes will tend to hold, while the other may get broken.
The default window (Sunday 18:00 – Tuesday 16:00 New York time) captures exactly this: the full Monday session plus Tuesday's contribution. Once the IB window closes, the remaining days of the week tend to trade in relation to these established levels.
What makes this different
Most Initial Balance indicators focus on the first 30 or 60 minutes of a single session. This indicator applies the IB concept to the weekly timeframe — capturing the Mon-Tue range that statistically defines the week's extremes. The configurable window, range extension multipliers, and clean label handling (current week only) make it a practical tool rather than a theoretical overlay.
How it works
- A shaded box marks the IB range (high and low) as it forms during the configured window
- After the window closes, the IB high, low, and 50% midpoint extend as horizontal reference levels
- Configurable range extensions (default 0.5x and 1.0x of the IB range) project above and below as potential targets
- Price labels display the exact level at each line (current week only — historical weeks show clean lines without clutter)
How to use it
- **Which side holds?** After the IB window closes, one extreme tends to hold for the week while the other gets broken — watch for which side price tests and rejects first
- **Range extensions as targets:** When the IB high or low breaks, the 0.5x and 1.0x extensions provide measured-move targets
- **Inside weeks:** If price stays within the IB range through Friday, the 50% midpoint often acts as a magnet
- **Volatility read:** A wide Monday–Tuesday range suggests the week's extremes may already be set; a narrow range suggests expansion is still ahead
- **Alerts:** Built-in alerts fire when price breaks the IB high or low after the window closes
Settings
- Fully configurable start/end day, hour, and minute (New York time)
- Adjustable number of historical weeks to display
- Configurable extension multipliers (not limited to 0.5x and 1.0x)
- Toggle individual levels, labels, and extensions on/off
- Works on any instrument with sufficient intraweek data (futures, forex, crypto)
Recommended timeframes: 30min and 1H charts for best visual clarity. Intraday only — the indicator requires sufficient chart history to display the configured number of weeks.
릴리즈 노트
Weekly Initial Balance — v1.1 Update New:
- 25% / 75% quartile levels (toggleable, customizable color/style/width) — pullback and entry reference zones inside the
IB range
Improvements:
- Toggles now hide lines instantly (previously stale lines could linger until aged out) - Extension lines now begin exactly at the last window bar (removed the 1-bar visual gap)
- Timeframe guard tightened to 2H and below (4H+ bars can straddle Sun 6PM / Tue 4PM boundaries and produce imprecise
levels)
- Labels update in place instead of being recreated each tick (smoother realtime rendering) - Stale-state safety net added to protect against data gaps at window start
Code quality:
- Explicit day mapping (clearer intent, no reliance on numeric day constants)
- Cleaner break detection logic
릴리즈 노트
**Update — robustness & customization**This update makes every visual toggle work retroactively across current and historical weeks, adds a third configurable range extension, and fixes two edge cases (mid-window chart loads and silent line-cap overruns).
**What's new**
- Third range extension (1.5x default), fully configurable like the others
- Style and width customization for all extension lines (matching the quartile controls)
- Configurable label offset — clean spacing between line endpoints and price labels
- "Weeks to Show" max set to 20 (line-cap-safe with all features enabled)
**What's improved**
- Toggling any feature on/off (50% level, quartiles, extensions, post-window levels) now applies instantly to current AND historical weeks — no more "toggle only affects future weeks"
- Charts that load mid-window no longer initialize a partial IB from an arbitrary bar
- Reducing "Weeks to Show" trims old drawings immediately instead of waiting for the next IB window
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Access my indicators and manual at: constantinpabst.com/
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Access my indicators and manual at: constantinpabst.com/
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.