OPEN-SOURCE SCRIPT
ที่อัปเดต: X VIB

Volume Imbalance Zones
X VIB highlights price-levels where buying or selling pressure overwhelmed the opposing side within a single bar transition, leaving a void that the market often revisits. The script paints those voids as boxes so you can quickly see where liquidity may rest, where price may pause or react, and which imbalances persist across sessions.
What it plots
For each completed calculation bar (your chart’s timeframe or a higher timeframe you choose), the indicator draws a box that spans the prior bar’s close to the current bar’s open—only when that bar-to-bar transition exhibits a valid volume imbalance (VIB) by the selected rules. Boxes are time-anchored from the previous bar’s time to the current bar’s time close, and they are capped to a configurable count so the chart remains readable.
Two ways to define “Volume Imbalance”
X VIB calculates imbalances in two complementary ways. Both techniques isolate bar-to-bar displacement that reflects one-sided pressure, but they differ in strictness and how much confirmation they require.
Continuity VIB (Bar-to-Bar Displacement)
A strict definition that requires aligned progress and overlap between consecutive bars. In practical terms, a bullish continuity VIB demands that the new bar advances beyond the prior bar’s close, opens above it, and maintains upward progress without erasing the displacement; the bearish case mirrors this to the downside.
Use when: you want the cleanest, most structurally reliable voids that reflect decisive initiative flow.
Effect on boxes: typically fewer, higher-quality zones that mark locations of strong one-sided intent.
Gap-Qualified VIB (Displacement with Gap Confirmation)
A confirmatory definition that treats the bar-to-bar displacement as an imbalance only if the transition also observes a protective “gap-like” relationship with surrounding prices. This extra condition filters out many borderline transitions and emphasizes voids that were less likely to be traded through on their formation.
Use when: you want additional confirmation that the void had genuine follow-through pressure at birth.
Effect on boxes: often slightly fewer but “stickier” zones that can attract price on retests.
Both modes are drawn identically on the chart (as boxes spanning the displacement). Their difference is purely in the qualification of what counts as a VIB. You can display either set independently or together to compare how each mode surfaces structure.
Multi-Timeframe (MTF) logic
You can compute imbalances on a higher timeframe (e.g., 15-minute) while viewing a lower timeframe chart. When MTF is active, X VIB:
Samples open, high, low, close, time, and time_close from the selected HTF in a single, synchronized request (no gaps, no lookahead).
Only evaluates and draws boxes once per HTF bar close, ensuring clean, stable zones that don’t repaint intra-bar.
How traders use these zones
Reversion into voids: Price often returns to “fill” part of a void before deciding on continuation or reversal.
Context for entries/exits: VIB boxes provide precise, mechanically derived levels for limit entries, scale-outs, and invalidation points.
Confluence: Combine with session opens, HTF levels, or volatility bands to grade setups. Continuity VIBs can mark impulse anchors; Gap-Qualified VIBs often mark stickier pockets.
Inputs & controls
Calculate on higher timeframe? Toggle MTF computation; choose your Calc timeframe (e.g., 15).
Show VIBs: Master toggle for drawing imbalance boxes.
Color & Opacity: Pick the box fill and border intensity that suits your theme.
# Instances: Cap how many historical boxes remain on the chart to avoid clutter.
Notes & best practices
Signal density: Continuity VIBs tend to be more frequent on fast charts; Gap-Qualified VIBs are more selective. Try both and keep what aligns with your trade plan.
MTF discipline: When using a higher calc timeframe, analyze reactions primarily at that timeframe’s pace to avoid over-fitting to noise.
Lifecycle awareness: Not all voids fill. Track which boxes persist; durable voids often define the map of the session.
X VIB highlights price-levels where buying or selling pressure overwhelmed the opposing side within a single bar transition, leaving a void that the market often revisits. The script paints those voids as boxes so you can quickly see where liquidity may rest, where price may pause or react, and which imbalances persist across sessions.
What it plots
For each completed calculation bar (your chart’s timeframe or a higher timeframe you choose), the indicator draws a box that spans the prior bar’s close to the current bar’s open—only when that bar-to-bar transition exhibits a valid volume imbalance (VIB) by the selected rules. Boxes are time-anchored from the previous bar’s time to the current bar’s time close, and they are capped to a configurable count so the chart remains readable.
Two ways to define “Volume Imbalance”
X VIB calculates imbalances in two complementary ways. Both techniques isolate bar-to-bar displacement that reflects one-sided pressure, but they differ in strictness and how much confirmation they require.
Continuity VIB (Bar-to-Bar Displacement)
A strict definition that requires aligned progress and overlap between consecutive bars. In practical terms, a bullish continuity VIB demands that the new bar advances beyond the prior bar’s close, opens above it, and maintains upward progress without erasing the displacement; the bearish case mirrors this to the downside.
Use when: you want the cleanest, most structurally reliable voids that reflect decisive initiative flow.
Effect on boxes: typically fewer, higher-quality zones that mark locations of strong one-sided intent.
Gap-Qualified VIB (Displacement with Gap Confirmation)
A confirmatory definition that treats the bar-to-bar displacement as an imbalance only if the transition also observes a protective “gap-like” relationship with surrounding prices. This extra condition filters out many borderline transitions and emphasizes voids that were less likely to be traded through on their formation.
Use when: you want additional confirmation that the void had genuine follow-through pressure at birth.
Effect on boxes: often slightly fewer but “stickier” zones that can attract price on retests.
Both modes are drawn identically on the chart (as boxes spanning the displacement). Their difference is purely in the qualification of what counts as a VIB. You can display either set independently or together to compare how each mode surfaces structure.
Multi-Timeframe (MTF) logic
You can compute imbalances on a higher timeframe (e.g., 15-minute) while viewing a lower timeframe chart. When MTF is active, X VIB:
Samples open, high, low, close, time, and time_close from the selected HTF in a single, synchronized request (no gaps, no lookahead).
Only evaluates and draws boxes once per HTF bar close, ensuring clean, stable zones that don’t repaint intra-bar.
How traders use these zones
Reversion into voids: Price often returns to “fill” part of a void before deciding on continuation or reversal.
Context for entries/exits: VIB boxes provide precise, mechanically derived levels for limit entries, scale-outs, and invalidation points.
Confluence: Combine with session opens, HTF levels, or volatility bands to grade setups. Continuity VIBs can mark impulse anchors; Gap-Qualified VIBs often mark stickier pockets.
Inputs & controls
Calculate on higher timeframe? Toggle MTF computation; choose your Calc timeframe (e.g., 15).
Show VIBs: Master toggle for drawing imbalance boxes.
Color & Opacity: Pick the box fill and border intensity that suits your theme.
# Instances: Cap how many historical boxes remain on the chart to avoid clutter.
Notes & best practices
Signal density: Continuity VIBs tend to be more frequent on fast charts; Gap-Qualified VIBs are more selective. Try both and keep what aligns with your trade plan.
MTF discipline: When using a higher calc timeframe, analyze reactions primarily at that timeframe’s pace to avoid over-fitting to noise.
Lifecycle awareness: Not all voids fill. Track which boxes persist; durable voids often define the map of the session.
เอกสารเผยแพร่
clean up codeเอกสารเผยแพร่
another code clean up เอกสารเผยแพร่
clean upเอกสารเผยแพร่
fixesสคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน