Stacked Imbalance Zones [BOSWaves]Stacked Imbalance Zones - Volume-Filtered Order Flow Detection with Delta-Adaptive Zone Visualization
Overview
Stacked Imbalance Zones is an order flow-based supply and demand identification system that detects consecutive dominant directional bars to construct high-conviction imbalance zones, where zone structure, visualization, and delta ribbon behavior dynamically adapt to reflect real-time buying and selling pressure within each identified region.
Instead of relying on arbitrary price pattern recognition or fixed pivot-based levels, zone formation, mitigation logic, and delta behavior are determined through volume-filtered bar dominance analysis, stacked run detection, and order flow measurement within confirmed zone boundaries.
This creates supply and demand regions that reflect genuine order flow imbalances rather than geometric price formations - forming only when multiple consecutive dominant bars satisfy volume thresholds, updating continuously with internal delta ribbon readings that reveal whether order flow within the zone is being absorbed or reinforced, and invalidating automatically when price demonstrates sufficient mitigation through configurable breach conditions.
Price is therefore evaluated against zones that represent actual market participant activity rather than theoretical support and resistance constructs.
Conceptual Framework
Stacked Imbalance Zones is founded on the principle that meaningful supply and demand regions emerge when consecutive bars exhibit dominant directional order flow above volume significance thresholds, rather than through isolated candle pattern matching or arbitrary pivot identification.
Traditional order block and supply/demand methodologies identify structural zones through single candle formations or price swing pivots, which frequently disregard the underlying volume conviction and directional persistence that distinguishes genuine institutional activity from noise. This framework replaces pattern-matching logic with stacked dominance detection informed by actual volume participation and bar-by-bar flow measurement.
Three core principles guide the design:
Zone formation should require consecutive dominant bars satisfying volume filter conditions, not isolated candle patterns.
Zone visualization must reflect internal order flow through delta ribbon dynamics, revealing absorption and continuation states.
Zone invalidation should respond to configurable mitigation conditions, distinguishing between tested and genuinely mitigated regions.
This shifts supply and demand analysis from static pattern identification into volume-anchored imbalance detection informed by measurable order flow evidence.
Theoretical Foundation
The indicator combines bar dominance ratio measurement, volume significance filtering, stacked run accumulation, and delta normalization.
Bar dominance is derived from the close position within the bar range, providing directional conviction measurement independent of candle color alone. Volume filtering against a Simple Moving Average baseline ensures only bars with sufficient participation contribute to zone formation. Stacked run tracking accumulates consecutive qualifying bars, capturing the multi-bar imbalance clusters that indicate genuine order flow concentration. Delta normalization converts raw volume flow into scaled readings that drive the internal ribbon visualization within each zone.
Four internal systems operate in tandem:
Bar Flow Measurement Engine : Calculates buy and sell dominance ratios from close positioning within the high-low range, providing directional bias measurement for each bar.
Volume Significance Filter : Compares bar volume against a rolling SMA baseline scaled by a configurable multiplier, qualifying only bars with meaningful participation.
Stacked Run Detection System : Tracks consecutive qualifying dominant bars, accumulating zone boundaries, total volume, and average dominance ratios across the run.
Delta Ribbon Visualization : Applies smoothed and scaled normalized delta readings within zone boundaries, producing a continuously updating order flow display inside each active zone.
This design allows detected zones to represent genuine imbalance conditions rather than mechanically responding to price formations.
How It Works
Stacked Imbalance Zones evaluates price through a sequence of order flow-aware processes:
Dominance Ratio Calculation : Buy ratio is derived from (close - low) / (high - low) and sell ratio from its inverse, providing bar-level directional conviction measurement.
Volume Filter Application : Bar volume is compared against the SMA baseline multiplied by the configured factor; bars failing this threshold do not qualify for zone formation.
Dominance Threshold Testing : Buy or sell ratio exceeding the configured dominance threshold on a volume-qualified bar classifies that bar as directionally dominant.
Stacked Run Accumulation : Consecutive dominant bars of matching direction are accumulated, tracking zone boundary expansion, cumulative volume, and average dominance across the run.
Zone Firing on Run Break : When a qualifying run ends through a non-dominant or opposite-dominant bar, the accumulated zone is committed with full metrics captured at break time.
Overlap Handling : Configurable overlap detection removes older same-direction zones that overlap with newly formed zones, preserving the most recent imbalance representation.
Delta Ribbon Update : On each bar within an active zone's lifespan, smoothed normalized delta updates the internal ribbon position, reflecting evolving order flow conditions.
Gradient Zone Rendering : Zones are drawn with configurable gradient layer fills, accent boundary lines, dashed midlines, and extended projections reflecting the zone's price range.
Mitigation Detection : On each confirmed bar, close is tested against the mitigation level - either the absolute zone boundary or the zone midpoint - triggering zone removal upon breach.
Zone Cap Management : Maximum zone count per side is enforced by removing the oldest zones when capacity is exceeded, maintaining a focused active zone set.
Together, these elements form a continuously updating imbalance map anchored in volume-confirmed order flow evidence.
Interpretation
Stacked Imbalance Zones should be interpreted as volume-confirmed order flow imbalance regions with internal flow monitoring:
Demand Zones (Green) : Formed by consecutive buy-dominant, volume-qualified bars, representing price regions where buying pressure was concentrated and stacked.
Supply Zones (Red) : Formed by consecutive sell-dominant, volume-qualified bars, representing price regions where selling pressure was concentrated and stacked.
Zone Body : The full height of the zone spans the aggregated price range of all contributing bars in the dominant run, from minimum to maximum body boundary.
Zone Midline : Dashed horizontal line at the zone average price, providing a reference for the Middle mitigation mode and partial reaction levels.
Gradient Fill : Multi-layer gradient visualization inside each zone provides depth cues, with configurable layer count for smoother or more distinct appearance.
Delta Ribbon : Vertical line series drawn from the zone average upward or downward reflects normalized delta readings, indicating whether order flow within the zone is currently buy or sell dominant.
Ribbon Edge Line : Optional connecting line traces the delta ribbon tip across bars, providing a continuous order flow trajectory within the zone boundary.
Accent Lines : High-opacity boundary lines emphasize the primary zone edge - bottom for demand zones, top for supply zones - marking the most significant flow concentration level.
Metrics Label : Extended zone displays the average buy or sell dominance percentage across all constituent bars, quantifying the imbalance strength.
Zone Extension : Right-side projection carries the zone forward in time, maintaining active visual reference until mitigation occurs.
Zone stack count, volume totals, and delta ribbon dynamics outweigh isolated price reactions at zone boundaries.
Signal Logic & Visual Cues
Stacked Imbalance Zones presents two primary zone types with continuous internal state monitoring:
Demand Zone Formation : Green zone appears when a buy-dominant stacked run of qualifying length concludes, identifying a region of concentrated buying activity available for future reference.
Supply Zone Formation : Red zone appears when a sell-dominant stacked run of qualifying length concludes, identifying a region of concentrated selling activity for directional context.
Delta ribbon dynamics within active zones provide secondary monitoring, revealing whether subsequent order flow is reinforcing or undermining the original imbalance condition.
Alert generation covers new demand stack formation and new supply stack formation for systematic zone-based monitoring workflows.
Strategy Integration
Stacked Imbalance Zones fits within order flow-informed and institutional level-based trading approaches:
Zone-Based Entry Framing : Use demand and supply zones as directional reference regions, entering on price interaction with confirmed imbalance levels rather than arbitrary support/resistance.
Delta-Confirmed Reactions : Monitor delta ribbon behavior as price approaches zones; ribbon maintaining original direction during retest suggests continued order flow alignment.
Stack Count Conviction Weighting : Assign higher confidence to zones formed from longer dominant runs, as greater consecutive bar participation reflects stronger imbalance concentration.
Volume Relevance Comparison : Use the internal relevance scoring, which weights zones by their volume contribution relative to total active zone volume, to prioritize higher-participation regions.
Mitigation Mode Selection : Apply Absolute mitigation for stricter zone validation requiring full boundary breach; apply Middle mitigation for earlier invalidation when price penetrates the zone midpoint.
Multi-Timeframe Zone Hierarchy : Apply higher-timeframe stacked imbalance zones as directional context filters while using lower-timeframe zones for entry precision.
Technical Implementation Details
Core Engine : Bar dominance ratio from close positioning within high-low range
Volume Filter : SMA baseline with configurable multiplier for participation significance
Run Detection : Consecutive dominant bar accumulation with boundary and volume tracking
Delta System : Normalized delta with EMA smoothing and configurable reactivity scaling
Zone Storage : Custom type arrays managing zone data and draw objects independently
Visualization : Gradient-layered boxes with accent lines, midlines, and delta ribbon line series
Mitigation Logic : Confirmed-bar close testing against absolute boundary or zone midpoint
Performance Profile : Optimized for real-time execution with configurable zone caps managing object count
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Intraday imbalance detection for scalping with responsive volume and dominance settings
15 - 60 min : Session-level supply and demand identification with balanced stack requirements
4H - Daily : Swing-level institutional zone mapping with sustained stack accumulation
Suggested Baseline Configuration:
Dominance Threshold : 0.62
Min Stack Count : 1
Volume Filter (×SMA) : 0.7
Volume SMA Length : 66
Zones Per Side : 4
Mitigation : Absolute
Hide Overlap : Enabled
Zone Extension : 40
Show Delta Ribbon : Enabled
Ribbon Height : 0.4
Ribbon Smoothing : 0.92
Gradient Layers : 4
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's volatility characteristics, volume behavior, and preferred zone frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Too many zones forming : Increase Dominance Threshold to demand stronger bar-level conviction or increase Min Stack Count to require longer consecutive runs.
Zones not forming frequently enough : Decrease Dominance Threshold toward 0.55 for more inclusive bar qualification or reduce the Volume Filter multiplier.
Volume filter too restrictive : Reduce Volume Filter multiplier toward 0.3 to allow lower-volume bars to qualify, or increase Volume SMA Length to smooth the baseline.
Zone boundaries too wide : Reduce Min Stack Count to capture tighter, shorter-run imbalances with a more concentrated price range.
Delta ribbon too reactive : Increase Ribbon Smoothing toward 0.99 for a calmer ribbon response or decrease Ribbon Reactivity to reduce sensitivity to individual bar delta swings.
Delta ribbon too slow : Decrease Ribbon Smoothing toward 0.5 or increase Ribbon Reactivity for faster adaptation to changing order flow within the zone.
Too many zones overlapping : Enable Hide Overlap to automatically remove older overlapping same-direction zones, or reduce Zones Per Side to limit active zone count.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets where stacked imbalance zones align with impulse direction and serve as pullback reference levels
Instruments with consistent volume participation where the SMA filter accurately distinguishes significant from insignificant bars
Order flow continuation strategies entering on price retests of confirmed imbalance zones
Session-open and momentum phase analysis where imbalance clustering identifies institutional interest levels
Reduced Effectiveness:
Choppy, low-volume environments where bar dominance thresholds are breached inconsistently without sustained stacking
Extremely thin-market conditions where volume SMA baselines become unreliable for significance filtering
News-driven spike events where imbalances form and immediately mitigate within the same session
Markets with irregular volume distribution where the SMA filter loses discriminative power across sessions
Consolidation and sideways conditions where zones form frequently but lack the directional follow-through that validates their structural significance
Integration Guidelines
Confluence : Combine with BOSWaves momentum tools, structure analysis, or multi-timeframe trend indicators for layered confirmation
Delta Respect : Monitor delta ribbon direction and magnitude as price approaches zones; aligned ribbon suggests reinforced imbalance, opposed ribbon indicates potential absorption
Stack Conviction : Favor zones formed from higher stack counts and greater total volume for primary reference levels
Mitigation Discipline : Respect mitigation events as genuine zone invalidation rather than treating mitigated levels as persistent support or resistance
Zone Freshness Awareness : Recent zones carry higher relevance than older formations; prioritize zones formed within current session or momentum phase context
Disclaimer
Stacked Imbalance Zones is a professional-grade order flow and supply/demand analysis tool. It uses volume-filtered bar dominance detection with stacked run identification but does not predict future price movements. Results depend on market conditions, instrument volume characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates momentum context, trend structure, and comprehensive risk management.
Pine Script® indicator






















