OPEN-SOURCE SCRIPT

Liquidity Acceptance Map [PhenLabs]

3 406
📊 Liquidity Acceptance Map [PhenLabs]
v1.0 — Equal high/low sweeps graded by a volume + ATR acceptance score — only the highest-conviction zones plotted

لقطة

📌 OVERVIEW

Liquidity Acceptance Map (LAM) identifies high-probability liquidity zones by combining three layers of confirmation: equal high/low detection (liquidity pool location), sweep event confirmation (price takes out the level), and a graded Acceptance Score (0–100) that measures how convincingly the market accepted the new price range using volume and ATR expansion.

Zones that don’t clear the score threshold are never plotted — only the highest-conviction sweeps make it to the chart. A real-time dashboard shows all active zones, their type, and live scores. An optional HTF EMA bias filter ensures you only see zones aligned with the higher-timeframe trend.


HOW IT WORKS

* Equal High/Low Detection
  • Swing pivots are identified using a balanced left/right lookback window
  • Two consecutive pivots within the configurable Equal Level Tolerance % form a liquidity pool
  • The pool level is the average of the two pivots — reducing precision noise


* Sweep Confirmation
  • A sweep fires when price exceeds the pool level by Sweep Margin %
  • Optional: require the close to be beyond the level (prevents wick-only traps)
  • Sweep detection is gated on barstate.isconfirmed — no repainting


* Acceptance Score (0–100)
  • Calculated on the sweep bar using two components:
  • Volume Component: how far current volume exceeds the N-bar average, normalized against the configured multiplier
  • ATR Component: how far current ATR exceeds the ATR average, normalized against the configured multiplier
  • Weighted combination: Score = Vol Score × Vol Weight% + ATR Score × (100 - Vol Weight%)
  • Score of 100 = full volume AND full ATR expansion at or above both multiplier thresholds
  • Zones with Score below Minimum Acceptance Score are silently discarded


* Zone Management
  • Accepted zones plotted as semi-transparent filled rectangles with a label: type, score, and entry price
  • Each zone includes a dashed invalidation line at a configurable offset beyond the zone boundary
  • When price closes beyond the invalidation level, the zone is greyed out — never deleted, always auditable
  • Maximum active zones is configurable (default: 2) — oldest zone removed when limit is hit


* HTF Bias Filter (Optional)
  • Pulls an EMA from a user-selected higher timeframe using lookahead_off — no lookahead repaint
  • Bullish zones (swept lows) only plot when HTF EMA is rising
  • Bearish zones (swept highs) only plot when HTF EMA is falling
  • Disabled by default — works as a standalone tool without it


🔑 POINTS OF INNOVATION

  • Graded Acceptance Score — most liquidity tools are binary (sweep or no sweep); LAM adds a 0–100 confidence layer so you know how much conviction backed the sweep
  • Dual-component scoring — volume expansion alone can mislead during low-ATR consolidation; combining both components produces a more robust regime signal
  • Zone cap per session — prevents chart clutter; only the 1–2 most relevant zones stay active at any time
  • Non-destructive invalidation — invalidated zones are greyed out, not deleted — preserving historical context without cluttering the active signal layer
  • HTF bias integration — directional conviction from a higher timeframe filters out counter-trend sweeps that statistically resolve against you
  • Dashboard table — real-time view of all active zones, types, and scores without needing to hover over boxes


🔧 SETTINGS

Equal High/Low Detection
  • Swing Lookback | Default: 20 | Range: 5–100 | Bars used to identify swing pivots
  • Equal Level Tolerance (%) | Default: 0.1 | Range: 0.0–2.0 | Max % difference for two pivots to be considered “equal”


Sweep Confirmation
  • Sweep Margin (%) | Default: 0.1 | Range: 0.0–2.0 | Price must exceed the pool level by this % to confirm a sweep
  • Require Close Beyond Sweep | Default: ON | Sweep requires a confirmed bar close beyond the level


Acceptance Score
  • Volume Expansion Multiplier | Default: 1.5 | Range: 1.0–5.0 | Volume ratio needed for full volume score
  • ATR Expansion Multiplier | Default: 1.2 | Range: 1.0–5.0 | ATR ratio needed for full ATR score
  • Volume Weight in Score (%) | Default: 60 | Range: 0–100 | Split between volume and ATR in the composite score
  • Minimum Acceptance Score | Default: 60 | Range: 0–100 | Zones below this score are discarded
  • Score MA Lookback | Default: 20 | Range: 5–100 | Lookback for volume and ATR moving averages


Zone Management
  • Max Active Zones | Default: 2 | Range: 1–5 | Cap on simultaneously visible zones
  • Invalidation Offset (%) | Default: 0.2 | Range: 0.0–2.0 | Close beyond this % negates the zone
  • Show Dashboard | Default: ON | Top-right table of active zones + scores


HTF Bias Filter
  • Enable HTF Bias Filter | Default: OFF
  • HTF Timeframe | Default: 240 (4H) | Higher timeframe for EMA
  • HTF EMA Period | Default: 50 | EMA period on the HTF


Colors
  • Bullish Zone, Bearish Zone, Sweep Marker, Invalidation Line — all fully customizable


🔥 ALERTS

  • LAM — Bullish Sweep Accepted: fires when a bullish sweep passes the acceptance score threshold
  • LAM — Bearish Sweep Accepted: fires when a bearish sweep passes the acceptance score threshold


🎨 VISUAL GUIDE

  • Teal filled rectangle = active bullish zone (swept low, price expected to hold as support)
  • Red filled rectangle = active bearish zone (swept high, price expected to hold as resistance)
  • Grey filled rectangle = invalidated zone (price closed beyond the invalidation line)
  • Dashed grey line = invalidation level for each zone
  • Orange triangle markers = sweep confirmation events (bull = below bar, bear = above bar)
  • Top-right table = dashboard: price level, zone type, acceptance score


📖 USAGE NOTES

  • Designed for 1H, 4H, and Daily timeframes — where equal high/low clusters carry the most institutional significance
  • On lower timeframes (15m), increase Equal Level Tolerance to 0.15–0.2% to account for spread noise
  • On volatile assets (crypto), increase Sweep Margin to 0.2–0.3% to avoid false sweep triggers
  • Scores above 75 indicate very high-conviction sweeps — consider these primary entries
  • Scores 60–75 are valid but lower confidence — useful for confirmation, not standalone entry
  • Enable HTF Bias Filter to avoid counter-trend fades in strongly trending markets
  • The zone height is one ATR centered on the swept level — giving each zone contextual thickness relative to the instrument’s volatility


WORKS WELL WITH

  • Volume profile tools (to confirm zone with high-volume nodes)
  • Session-based VWAP (anchored from sweep bar)
  • Trend filters (EMA, Supertrend) to qualify zone direction
  • Risk management tools (ATR-based stops, aligning with invalidation levels)


⚠️ DISCLAIMER

This indicator is for educational and research purposes only. It does not constitute financial advice or a trading recommendation. Past performance does not guarantee future results. Always conduct your own analysis before making any trading or investment decision.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.