OPEN-SOURCE SCRIPT

Cascade Liquidity Zones [JOAT]

11 813
Cascade Liquidity Zones [JOAT]

Introduction

Cascade Liquidity Zones is an open-source institutional stop-hunt and liquidity zone detector built around the mechanics of how large participants move price through retail stop clusters before reversing. It identifies demand and supply zones from pivot-impulse structures, scores them by quality, confirms sweep events with multiple filters, and marks potential failure entry patterns — all within a single indicator that requires no additional tools to interpret.

The foundational premise is that price routinely sweeps beyond visible structural levels to trigger stop orders placed by retail participants, before institutional participants absorb the liquidity generated and reverse price. Identifying these events in advance, tracking the zones where they are likely to occur, and confirming them with volume and wick rejection filters produces a framework for anticipating institutional reactions at structural extremes.

スナップショット

Core Concepts

1. Pivot-Impulse Zone Creation

Demand zones are formed from confirmed pivot lows and supply zones from confirmed pivot highs. Each pivot creates a zone spanning a configurable ATR multiple, representing the area of institutional activity around that structural level. Zones are scored using a three-component Impulse Quality Score:

Pine Script®


This scores the impulse candle by three factors: directional body conviction (40%), volume participation relative to average (35%), and range size relative to ATR (25%).

2. Four-Layer Glow Zone Visualization

Each zone is drawn as four concentric boxes expanding outward from the core zone level, with decreasing opacity on each outer layer. This creates a visual glow effect that communicates zone location and zone type at a glance. Demand zones use the bull theme color; supply zones use the bear theme color.

3. Sweep Confirmation Engine

A demand zone sweep is confirmed when all of the following conditions pass simultaneously on a confirmed bar: minimum wick penetration percentage, close back inside or above the zone, volume exceeds average by a configurable multiple, wick rejection percentage exceeds minimum threshold, cooldown period elapsed, and optional pattern filters pass.

4. Failure Entry Engine

An alternative entry mode detects price failure patterns at pivot levels. A bullish failure occurs when price wicks below the most recent confirmed pivot low and closes back above it on the same bar, with the wick exceeding a minimum ATR size and a minimum rejection percentage. This targets trapped short-sellers at pivot extremes.

5. Zone Flip Mechanics

When price closes fully through a demand zone, that zone flips to a supply zone — its color changes from bull to bear theme color and it becomes eligible for short-side sweeps. This reflects the structural concept that broken support becomes resistance.

6. Liquidity Value and Hold Percentage

Each zone tracks cumulative volume × price product from its origin bar, displayed as a liquidity value label ($K, $M, $B). Zones also track how many times price has touched and rejected from them without breaking through, expressed as a hold percentage.

スナップショット

Features

  • Pivot-impulse zone creation: Demand and supply zones built from confirmed structural pivot points, scored by impulse quality
  • Three-component impulse quality score: Body conviction, volume participation, and ATR-relative range scored at zone creation
  • Four-layer glow boxes: Each zone drawn as four concentric boxes with decreasing opacity for a depth visualization effect
  • Multi-filter sweep confirmation: Wick penetration %, close direction, volume multiple, wick rejection %, cooldown, and optional pattern filters
  • Failure entry engine: Detects pivot-wick failure patterns as an alternative signal type with independent settings
  • Zone flip: Broken demand zones automatically flip to supply and vice versa
  • Liquidity value labels: Volume × price accumulated at each zone's origin bar, displayed in human-readable scale
  • Hold percentage: Ratio of zone tests that did not break through; used to prioritize zone strength
  • Trade block on sweep: Entry, stop, and two TP levels rendered as boxes and lines when a sweep confirms
  • Zone clustering: Overlapping zones within a minimum ATR separation are deduplicated, keeping the higher-quality zone
  • Backtest tracker: Win rate and expected value tracked across all sweep signals
  • Non-repainting: All sweep confirmations gated by barstate.isconfirmed
  • Institutional dashboard: 18-row table with zone statistics, sweep and failure counts, win rate, and expected value


Input Parameters

Zone Detection:
  • Pivot Lookback: Bars required on each side to confirm a pivot (default: 10)
  • Max Active Zones Per Side: Maximum simultaneous demand or supply zones (default: 8)
  • Zone ATR Width: Zone height as ATR multiple (default: 0.4)
  • Min Zone Separation: Minimum distance between zones in ATR units (default: 1.5)


Sweep Confirmation:
  • Min Wick Penetration %: Minimum wick extension through zone boundary
  • Volume Confirmation toggle and minimum volume multiple
  • Wick Rejection Filter toggle and minimum rejection %
  • Cooldown Bars Between Sweeps


Failure Entry:
  • Enable Failure Entry Mode toggle
  • Pivot lookback, wick ATR minimum, wick rejection minimum, volume confirmation, cooldown


Trade Block:
  • Show Trade Block toggle
  • RR Ratio for TP placement
  • SL Mode: Zone boundary or Wick extreme
  • SL Buffer in ATR units


How to Use This Indicator

Step 1: Identify Active Zones
Fresh zones (not yet swept) are displayed in full color. Prioritize fresh zones with high hold percentages and large liquidity values for upcoming sweep setups.

Step 2: Wait for Sweep Confirmation
A sweep is confirmed when the bar closes after the wick penetration. The trade block appears automatically with entry at the close of the confirmation bar, stop behind the zone boundary plus buffer, TP1 at 1:1 R, and TP2 at the configured RR ratio.

Step 3: Distinguish Sweeps from Failures
Standard sweeps require price to touch inside the zone boundary. Failure entries detect pivot-level failures at a higher structural level. Enable only one mode at a time to avoid conflicting signals.

Indicator Limitations

  • Pivot confirmation requires bars after the pivot candle. Zones are plotted with an inherent offset corresponding to the lookback length
  • All sweep confirmations require a bar close. Price that sweeps and reverses within the same bar without confirming on close will not generate a signal
  • Volume-based filters are less reliable on assets where volume data is unreported or synthetic
  • Zone flip mechanics assume that a broken level becomes resistance. This structural assumption does not hold in all market conditions


Originality Statement

  • The combination of a three-component impulse quality score at zone creation, four-layer glow box visualization, multi-condition sweep confirmation, zone flip mechanics, and a failure entry engine in a single indicator is not replicated in existing open-source Pine Script v6 publications
  • The liquidity value metric (volume × price at pivot origin) as a zone ranking input alongside hold percentage provides an institutional sizing dimension that simple pivot-based zone indicators do not include
  • The dual-mode architecture (sweep engine + failure entry engine) with independent settings for each, selectable via a single mode toggle, allows the same structural framework to address two different entry philosophies within one indicator


Disclaimer

This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Liquidity sweep patterns identified by this indicator represent historical structural events, not predictions of future price behavior. The author accepts no responsibility for trading losses resulting from use of this indicator.

Made with passion by jackofalltrades

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。