OPEN-SOURCE SCRIPT

Liquidity Profile Order Blocks [BOSWaves]

5 817
Liquidity Profile Order Blocks [BOSWaves] - Impulse-Validated Order Block Detection with Embedded Net Delta Volume Profiles

Overview

Liquidity Profile Order Blocks [BOSWaves] is a pivot-anchored order block detection system that constructs supply and demand zones from impulse-validated swing events and embeds a live net delta volume profile inside each active block, where zone boundaries, profile distribution, and visual intensity are driven by measurable price displacement, volume-weighted directional flow at each price row, and real-time retest interaction rather than arbitrary candle pattern matching or static zone geometry.

תמונת-בזק

Instead of identifying order blocks through isolated candle formations or fixed lookback patterns, each block requires a confirmed swing pivot followed by a displacement move exceeding a configurable ATR multiple, ensuring that only structurally significant events with genuine impulse evidence behind them generate zones. The embedded net delta profile then maps the buy and sell volume distribution across the price rows of each block using the formation candles, identifying the Point of Control and revealing whether the underlying flow within the block was predominantly buying or selling pressure at each specific level.

This creates an order block framework that combines structural detection criteria with internal participation intelligence. Each zone simultaneously shows where price pivoted with sufficient impulse to warrant attention, how volume was distributed across its price range during formation, whether that distribution was net buy or net sell dominant at each level, and how the balance is evolving as price retests the zone. When price enters an active block the visual system responds with intensified borders, brightened profile rows, and a glow effect that makes active interaction immediately identifiable.

Price is therefore evaluated not just against zones that meet structural criteria but against zones with a fully mapped internal participation profile that reveals the order flow composition of the institutional activity that created them.

Conceptual Framework

Liquidity Profile Order Blocks is founded on the principle that genuine order block zones carry two layers of evidence: a structural fingerprint in price behavior visible through pivot and impulse mechanics, and a participation fingerprint visible through the distribution of buying and selling volume across the zone's price range during its formation.

Traditional order block tools identify zones through candle pattern criteria alone and display them as uniform rectangles with no internal structure, treating all zones equally regardless of their internal flow composition. This framework adds the participation layer by building a per-row net delta profile inside each zone from the same bars that defined it, exposing how aggressively one side dominated at each price level and identifying the specific level within the zone where the greatest total participation was concentrated.

Three core principles guide the design:
  1. Order block detection should require both a confirmed swing pivot and a measurable impulse displacement, ensuring structural and momentum criteria are satisfied simultaneously before a zone is committed.
  2. Each zone should carry an embedded net delta profile derived from its formation bars, providing internal participation intelligence that distinguishes between zones with clean directional conviction and zones with contested or mixed flow composition.
  3. Zone visualization should respond dynamically to retest interaction, intensifying when price is actively engaging with a block to communicate the structural significance of the current price location in real time.

This shifts order block analysis from pattern-matching zone marking into impulse-validated structural detection with embedded volume profile intelligence that reveals the institutional participation dynamics underlying each zone.

Theoretical Foundation

The indicator combines pivot high and low detection for swing identification, ATR-normalized impulse measurement for displacement validation, multi-candle zone boundary construction from formation bars, per-row volume allocation using price overlap fractions, net delta calculation across profile rows, POC identification by maximum row volume, retest interaction detection for profile updates and active state management, and a multi-layer gradient visualization system with glow intensity scaling.

Pivot detection uses configurable left and right bar requirements to identify confirmed swing highs and lows. Impulse validation measures the price displacement from pivot to the detection bar relative to ATR, filtering for only the moves with sufficient momentum evidence. Zone boundaries are constructed from the configured number of formation candles preceding the pivot, with ATR-based minimum and maximum height constraints preventing zones from being either too thin to be meaningful or too wide to be actionable. Volume allocation to each profile row is proportional to the overlap between each formation bar's range and the row boundary, ensuring volume is distributed to the price levels where it actually traded rather than assigned uniformly.

Four internal systems operate in tandem:
  • Impulse-Validated Detection Engine: Monitors confirmed pivot highs and lows and tests the displacement from pivot price to current close against the ATR multiple threshold, qualifying only structurally significant impulse events as order block origins.
  • Zone Construction and Constraint System: Builds zone boundaries from formation candles with ATR-based height clamping, manages maximum zone count by removing oldest blocks when the limit is reached, and optionally removes overlapping same-side zones to maintain a clean active zone set.
  • Net Delta Profile Engine: Allocates volume from formation bars to price rows via overlap-weighted fractions, tracks signed buy and sell volume per row to derive net delta ratios, identifies the POC as the maximum total volume row, and optionally updates the profile with additional volume on each confirmed retest bar.
  • Retest Interaction and Visual System: Monitors price entry into each zone, tracks touch count and armed state, detects mid-level confirmation for active signal generation, scales visual intensity through glow, border weight, and profile row brightness based on interaction state, and invalidates zones on configurable close or wick breach conditions.

This design ensures each zone carries both structural and participatory credentials while the visual system communicates interaction state dynamically throughout the zone's active lifecycle.

How It Works

Liquidity Profile Order Blocks evaluates price through a sequence of structure-aware and participation-tracking processes:
  1. Pivot Detection: Swing highs and lows are confirmed when the configured number of bars to the left and right validate the pivot, identifying structurally significant turning points for impulse testing.
  2. Impulse Validation: On each confirmed pivot, the price displacement from the pivot level to the current close is measured in ATR multiples. Displacement exceeding the configured threshold qualifies the event as an order block origin.
  3. Zone Boundary Construction: The formation candle range spanning the configured number of bars before the pivot is used to derive zone top and bottom, with ATR-based minimum and maximum height constraints applied to ensure zone dimensions remain structurally meaningful.
  4. Overlap Removal: When enabled, a newly created zone checks for existing same-direction zones that overlap with its boundaries and removes the oldest overlapping zone, preserving the most recently formed level.
  5. Formation Profile Build: Each formation bar's volume is allocated to profile rows in proportion to the overlap between the bar's high-low range and each row boundary. Bullish formation bars contribute to buy volume and bearish bars to sell volume, building the initial net delta distribution across the zone's price rows.
  6. POC Identification: The row with the greatest total volume accumulation across all formation bars is identified as the Point of Control, receiving distinct highlighting and an optional midpoint line.
  7. Active State Monitoring: On each subsequent bar, price is tested for entry into each zone. Entry triggers a touch count increment and arms the zone for signal detection. When price closes beyond the midline in the zone direction after touching, the zone enters active state with intensified visual treatment.
  8. Retest Profile Update: When the retest profile update setting is enabled, each confirmed bar while price is inside a zone contributes additional volume to the net delta profile, keeping the participation distribution current as the auction continues.
  9. Visual Refresh: On every bar all active zones are redrawn with current glow intensity, border weight, profile row colors, and info box content reflecting the latest touch count, net delta percentage, total volume, and active state.
  10. Invalidation Testing: On each confirmed bar, close or wick price is tested against the zone boundary in the opposing direction. Breach triggers zone deletion with full cleanup of all associated visual objects.

Together, these elements form a continuously updating order block system where structural credentials, internal participation profiles, and real-time retest dynamics are maintained simultaneously across all active zones.

Interpretation

Liquidity Profile Order Blocks should be interpreted as an impulse-validated structural zone system with embedded participation intelligence and dynamic interaction tracking:
  • Bullish Order Block (Green): Zone formed below a confirmed swing low followed by a sufficient upward impulse, identifying a price region where buying activity concentrated before a displacement move higher.
  • Bearish Order Block (Red): Zone formed above a confirmed swing high followed by a sufficient downward impulse, identifying a price region where selling activity concentrated before a displacement move lower.
  • Zone Body: The shaded rectangle spanning the formation candle range with gradient fill reflecting zone direction. Gradient intensity increases toward the dominant edge of the zone where institutional activity was most concentrated.
  • Net Delta Profile Bars: Horizontal bars centered within the zone body extending left or right from the center line to reflect net buy or net sell dominance at each price row. Longer bars indicate more decisive directional dominance at that level.
  • Point of Control Row: The profile row with the greatest total volume receives a distinct highlighted background and optional horizontal line, marking the price level of maximum participation concentration within the zone.
  • Info Box: Panel extending to the right of each zone displaying zone direction, net delta percentage across all formation volume, and total formatted volume, providing a quick quantitative summary of the zone's participation profile.
  • Midline: Dashed horizontal line at the zone center provides the reference level for mid-zone confirmation logic and serves as a precision target for entries and invalidation management.
  • Active Retest Glow: When price enters a zone after prior interaction, borders intensify, the POC line brightens, profile rows saturate, and the seam line thickens, communicating active structural engagement with immediate visual clarity.
  • Trend Cloud: Optional EMA fill and lines provide macro trend regime context, coloring in the bullish or bearish direction to help assess whether order block retests are occurring with or against the broader directional trend.

Zone impulse strength, net delta profile composition, POC location, touch count, and active glow state collectively provide more structural intelligence than zone boundaries alone.

Signal Logic & Visual Cues

Liquidity Profile Order Blocks generates retest confirmation signals when specific interaction conditions within active zones are met:
  1. Bullish Retest Confirmation: Generated when price enters a bullish order block, the zone is in armed state from a prior touch, and price closes above the zone midline after having been at or below it, suggesting buying pressure is reasserting within the demand zone.
  2. Bearish Retest Confirmation: Generated when price enters a bearish order block, the zone is in armed state from a prior touch, and price closes below the zone midline after having been at or above it, suggesting selling pressure is reasserting within the supply zone.

Both signal types require prior zone interaction to arm the zone before confirmation can trigger, filtering out first-touch reactions and focusing on the mid-level confirmation that indicates directional intent within the block.

Alert generation covers bullish and bearish retest confirmations for systematic zone-based monitoring workflows.

Strategy Integration

Liquidity Profile Order Blocks fits within institutional order flow and structural zone-based trading approaches:
  • POC-Precise Entries: Use the POC row within each zone as the highest-precision entry reference rather than the full zone boundary, placing entries at the level of maximum prior participation where the institutional activity was most concentrated.
  • Net Delta Zone Selection: Prioritize bullish zones showing net buy dominance in the profile and bearish zones showing net sell dominance, as aligned delta composition confirms that the formation volume was directionally consistent with the expected zone function.
  • Mid-Level Confirmation Entries: Use the midline confirmation signal as an entry trigger rather than entering on initial zone touch, waiting for price to demonstrate directional intent by closing beyond the zone center in the expected direction.
  • Touch Count Conviction Weighting: Assign higher confidence to zones with lower touch counts. Fresh zones with zero prior retests carry the most unmitigated institutional order potential. Zones with multiple touches have progressively absorbed more of the original order flow.
  • Retest Profile Monitoring: Monitor the net delta profile as it updates during retests with the Update Net Profile on Retest setting enabled. Profile composition shifting against the zone direction during a retest suggests absorption rather than continuation, warranting reduced confidence in zone integrity.
  • Invalidation Mode Selection: Use Close invalidation for stricter zone management that requires a full bar close beyond the boundary. Use Wick invalidation for earlier removal when any price excursion beyond the zone boundary is sufficient to consider the level structurally violated.

Technical Implementation Details
  • Detection Engine: Pivot high and low confirmation with ATR-normalized displacement measurement for impulse validation
  • Zone Construction: Multi-candle formation boundary derivation with ATR min and max height clamping and optional overlap removal
  • Profile System: Per-row volume allocation via high-low overlap fractions with signed net delta accumulation and maximum volume POC identification
  • Interaction Logic: Touch count tracking, armed state management, mid-level confirmation detection, and optional retest profile accumulation
  • Visual System: Multi-layer gradient zone fill, glow-scaled borders and lines, net delta profile bars, POC row and line highlighting, and info box with live metrics
  • Invalidation: Configurable close or wick breach detection with full object cleanup on zone removal
  • Trend Context: Dual EMA regime cloud with configurable fast and slow lengths for directional bias overlay
  • Performance Profile: Optimized with configurable maximum block count and array-based object management supporting real-time execution across all timeframes

Optimal Application Parameters

Timeframe Guidance:
  • 1 - 5 min: Intraday order block mapping for scalping with shorter pivot length and tighter impulse threshold for responsive zone formation on smaller structural moves
  • 15 - 60 min: Session-level institutional zone identification with balanced pivot and impulse settings producing zones aligned with meaningful intraday structural events
  • 4H - Daily: Swing-level demand and supply zone mapping with higher pivot requirements and wider impulse thresholds reflecting larger structural displacements

Suggested Baseline Configuration:
  • Pivot Length: 8
  • Impulse Size (ATR): 1.10
  • Formation Candles: 4
  • Remove Overlapping Same-Side Blocks: Enabled
  • Minimum Zone Height (ATR): 0.12
  • Maximum Zone Height (ATR): 1.20
  • Maximum Blocks: 6
  • Invalidation: Close
  • Profile Granularity: 12
  • POC Highlight: Both
  • Update Net Profile On Retest: Enabled
  • Active Retest Glow: Enabled
  • Show Info Box: Enabled
  • Show MA Fill: Disabled
  • Show MA Lines: Disabled

These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's volatility characteristics, typical impulse behavior, and preferred zone density, 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 Impulse Size to demand a stronger displacement move after each pivot, or increase Pivot Length to require more structurally significant swing confirmation before an order block qualifies.
  • Zones not forming frequently enough: Decrease Impulse Size toward 0.5 for more inclusive displacement qualification, or decrease Pivot Length toward 3 for faster pivot confirmation on shorter swing structures.
  • Zone boundaries too wide: Decrease Maximum Zone Height ATR multiplier to compress oversized zones, or decrease Formation Candles to limit the boundary range to fewer formation bars.
  • Zone boundaries too narrow: Increase Minimum Zone Height ATR multiplier to expand zones that are structurally too thin to provide meaningful interaction space.
  • Profile too granular or too coarse: Adjust Profile Granularity to increase or decrease the number of price rows, calibrating profile resolution to the zone height and the instrument's typical price movement within order block regions.
  • Zones invalidating too quickly: Switch Invalidation to Close mode to require a full bar close beyond the boundary rather than a wick excursion, reducing premature zone removal on temporary price spikes.
  • Too many zones overlapping: Enable Remove Overlapping Same-Side Blocks to automatically clean older zones when new ones form at the same area, or reduce Maximum Blocks to limit total active zone count.

Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.

Performance Characteristics

High Effectiveness:
  • Trending markets with clear impulse moves following swing pivots where order block zones consistently align with subsequent pullback reaction levels
  • Liquid instruments with consistent volume where the net delta profile produces meaningful row-level participation distributions that accurately reflect institutional flow composition
  • Institutional zone-based trading approaches where POC precision entries and net delta filtering provide higher-quality trade framing than conventional order block boundary entries
  • Multi-timeframe workflows where higher-timeframe order block zones provide directional structural context for lower-timeframe entry timing

Reduced Effectiveness:
  • Choppy, range-bound markets where frequent small swing pivots generate overlapping zones without the sustained impulse displacement required for meaningful structural significance
  • Low-liquidity instruments where thin volume produces sparse net delta profiles with insufficient row-level differentiation to distinguish POC and flow composition reliably
  • News-driven or gap-heavy markets where impulse moves occur on discontinuous price action that distorts zone boundary derivation relative to actual institutional entry levels
  • Instruments with irregular volume distribution where the net delta profile loses compositional accuracy due to inconsistent participation patterns across formation bars
  • Extreme volatility environments where ATR-based zone constraints produce inconsistent zone sizes that do not reflect the structural significance of the underlying pivot events

Integration Guidelines
  • Confluence: Combine with BOSWaves momentum tools, volume analysis, or structural break indicators to validate order block retests with broader analytical context before acting on mid-level confirmation signals
  • Profile Composition Awareness: Treat net delta profile composition as a zone quality indicator. Zones with clean directional dominance across most rows carry higher conviction than zones with mixed or opposing flow across their price range.
  • POC Respect: Use the POC row as the precision reference for entry placement and invalidation management. The maximum participation level within the zone represents the most meaningful price within the block from an institutional activity perspective.
  • Touch Count Discipline: Reduce position sizing or confidence on zones that have been retested multiple times. Each touch consumes a portion of the original order flow that created the zone, reducing the probability of a sustained reaction on subsequent tests.
  • Active Glow Response: Treat the active glow state as an immediate visual alert that price is engaging with a structurally significant level. Use this as a cue to increase monitoring frequency and prepare for confirmation or invalidation rather than acting immediately on zone entry alone.

Disclaimer

Liquidity Profile Order Blocks [BOSWaves] is a professional-grade order block detection and volume profile analysis tool. It uses impulse-validated pivot detection with per-row net delta profiling but does not access true exchange-level order book data. All volume distribution and flow measurements are derived from OHLCV data and represent best-approximation estimates of institutional participation rather than actual order book information. Results depend on instrument liquidity, volume reliability, 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.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.