OPEN-SOURCE SCRIPT

Displacement Acceptance Engine [PhenLabs]

1 365
📊 Displacement Acceptance Engine [PhenLabs]

Version: PineScript™ v6

📌 Description
The Displacement Acceptance Engine grades what happens after a liquidity sweep — not just the sweep itself. Most sweep tools fire on a wick beyond a swing and stop there. DAE waits for a real displacement leg, then scores whether price accepts that move or rejects it.

Traders see a clean story on the chart: sweep zone → neon displacement beam → scored ▲ ACC / ✕ REJ label, plus a live dashboard with bias, state, score, last event, HTF context, and volume pulse. Built for SMC/ICT retail who want continuation quality after stop-hunts on crypto, indices, FX, and metals.

🔧 Core Features
• Confirmed BSL/SSL liquidity pools from swing pivots
• Stop-hunt sweep detection with ATR buffer and optional close-back-inside
• Displacement window that requires body + ATR expansion beyond the sweep
• Acceptance vs rejection resolve with hold-fraction logic
• Mechanical 0–10 score (depth, displacement, body, volume, structure, HTF)
• Neon beams, sweep zones, scored labels, and PhenLabs command dashboard
• Cooldown + max visible events to keep charts readable

⚙️ How It Works
• Sweep Depth — wick pierce beyond the pool normalized by ATR
• Displacement Magnitude — impulse leg size vs ATR after the sweep
• Body Quality — displacement candle body strength vs ATR
• Volume Pulse — bar volume vs SMA (HOT / OK / SOFT)
• Structure Break — close through recent swing extreme or pool buffer
• HTF Bias — optional higher-timeframe alignment bonus
• Final score gates high-conviction ▲ ACC labels; failed holds print ✕ REJ

🎨 Visual Guide
• Dotted pool rails — active buyside / sellside liquidity
• Translucent sweep boxes — stop-hunt event footprint
• Dual-glow displacement beams — core + outer rail from origin to impulse close
• ▲ ACC / ✕ REJ scored labels — continuation quality at a glance
• Soft bar highlight — high-score acceptance bars only
• Top-right dashboard — BIAS · STATE · SCORE · EVENT · HTF · VOL · POOLS

📡 Alerts
• Bull Liquidity Sweep
• Bear Liquidity Sweep
• Bull Displacement
• Bear Displacement
• Bull Acceptance High Score
• Bear Acceptance High Score
• Displacement Rejection

⚙️ Key Settings
• Pivot Lookback — Default: 5 — pool sensitivity
• Require Close Back Inside — Default: true — classic stop-hunt reclaim
• Displacement Window — Default: 6 bars — time allowed for impulse
• Min Displacement (ATR) — Default: 0.55 — impulse size gate
• Acceptance Window — Default: 8 bars — hold / fail resolve time
• Hold Fraction of Disp Leg — Default: 0.45 — acceptance hold line
• Min Acceptance Score — Default: 6.0 — label / highlight gate
• HTF Bias Timeframe — Default: 60 — score alignment context
• Max Visible Events — Default: 8 — clutter control

⚠️ Disclaimer
Educational tool only. Not financial advice. Past structure ≠ future results. Always manage risk.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。