OPEN-SOURCE SCRIPT

DZ

187
DZ – Pivot Demand Zones + Trend Filter + Breadth Override + SL is a structured accumulation indicator built to identify high-probability demand areas after valid pullbacks.

The script creates **Demand Zones (DZ)** by pairing **pivot troughs (local lows)** with later **pivot peaks (local highs)**, requiring a minimum **ATR (Average True Range)** gap to confirm real price displacement. Zones are drawn only when market structure confirms strength through a **trend filter** (a required number of higher highs over a recent window) or a **breadth override**, which activates after unusually large expansion candles measured as a percentage move from the prior close.

In addition to pivots, the script detects **coiling price action**—tight trading ranges contained within an ATR band—and treats these as alternative demand bases.

Entries require price to penetrate a defined depth into the zone, preventing shallow reactions. After the first valid entry, a **DCA (Dollar-Cost Averaging)** system adds buys every 10 bars while trend or breadth conditions persist. A **ratcheting SL (Stop-Loss)** tightens upward only, using demand structure or ATR when zones are unavailable.

The focus is disciplined, volatility-aware accumulation aligned with structure.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.