PROTECTED SOURCE SCRIPT
Telah dikemas kini

Demand & Supply Smart Zones (Riz)

63
A professional zone engine that detects, ranks, and maintains Supply and Demand areas across multiple timeframes. It combines swing structure, engulfing/imbalance logic, optional liquidity-sweep validation, and trend/volume filters. Zones are refined, merged, aged, and removed automatically, while a dashboard and mini-map summarize the state of the market at a glance.

How it works (why this isn’t a simple mashup)

⦁ Zone Detection (Auto/Manual/Hybrid):
⦁ Auto finds zones from three independent catalysts: swing turns, engulfing patterns, and imbalance candles.
⦁ Manual lets you define a zone precisely (top/bottom + type).
⦁ Hybrid adds your manual zones on top of the model’s detections.

⦁ Strength Model: Each zone receives a score using ATR-scaled size, relative volume (vs SMA), timeframe weight (higher TF = more authority), and session context (optional Killzone boost). This surfaces the most actionable areas rather than plotting everything.

⦁ Filters for Quality (Conservative/Aggressive):
⦁ Conservative can require trend alignment (EMA), volume validation, wide-body candles, structure context, and optional liquidity sweep checks.
⦁ Aggressive relaxes filters for faster, more frequent zones (e.g., scalping).

⦁ Refinement & Styling: Zones can be refined by wick, body, or hybrid logic to avoid over-sized regions. Visuals support solid/gradient/border styles, fresh/retest labels, and a heat-map emoji for strength.

⦁ Lifecycle Management: Zones can auto-delete on touch, delete on break, shrink on retests, expire after X bars, and cap retests. Old/merged zones are cleaned up to keep charts responsive.

⦁ Multi-Timeframe (MTF) Logic: Detects and optionally normalizes HTF zones (e.g., 60/240/D). Overlapping zones are merged across TFs with the higher TF taking precedence and receiving a small strength bonus. This prevents duplication and emphasizes institutional levels.

⦁ Proximity & Interaction Alerts: Alerts can fire on approach, first entry, and break, with separate Supply/Demand variants and per-TF options. An internal tracker avoids duplicate alert spam.

On-chart tools
⦁ Zones: Supply (red) / Demand (green), with “Fresh” or “R#” labels and strength heat-map.
⦁ Dashboard: Counts zones per TF, shows nearest supply/demand (in pips), trend state, and mode.
⦁ Mini-Map: A compact list of the 10 closest zones with TF, freshness, strength, and distance.
⦁ Trend Line (optional): EMA for directional context.
⦁ Killzone Background (optional): Session emphasis for timing.

Inputs & Key Options
⦁ Detection Mode: Auto · Manual · Hybrid
⦁ Strictness: Aggressive (more zones) · Conservative (fewer, higher quality)
⦁ Catalysts: Engulfing, Imbalance (ATR + volume threshold), Swing strength
⦁ Filters: Volume multiplier, wide-body %, trend EMA, structure checks, liquidity sweep lookback
⦁ MTF: Up to 3 higher TFs, with normalization to prevent oversized zones and priority stacking
⦁ Management: Auto-delete on touch, delete on break, dynamic shrinking, expiry bars, max retests
⦁ Merging: Overlap threshold and cross-TF consolidation
⦁ Alerts: Proximity (distance in pips), First Entry (fresh touch), Break, per-TF toggles
⦁ Display: Labels, size, heat-map, merging tags, dashboard position, mini-map


How to use
1. Choose Strictness
⦁ Conservative for swing/HTF traders who prefer cleaner, stronger zones.
⦁ Aggressive for scalpers who want earlier, more frequent levels.

2. Enable MTF and set HTF1/HTF2(/HTF3). Turn on Normalization to avoid giant HTF boxes.
3. Pick Catalysts & Filters. Start with Engulfing + Imbalance + Swing. Add volume/EMA/liquidity filters for quality.
4. Watch the Dashboard: It highlights mode, counts per TF, nearest zones (with distance), and overall trend.

5. Trade the Interaction:
⦁ Proximity alert → prepare;
⦁ First entry (fresh touch) → your confirmation rules;
⦁ Break → consider flips or invalidation.

6. Manual Zones (Hybrid): Add precise institutional levels and let the engine manage them (shrink, expire, merge).

Alerts (titles you’ll see)
⦁ Zone Proximity – approach within X pips
⦁ Zone Entry / Supply Zone Entry / Demand Zone Entry – first touch
⦁ Zone Break / Supply Zone Break / Demand Zone Break – clean break
⦁ Current TF / HTF1 / HTF2 Zone Alert – timeframe-specific triggers
⦁ Any Zone Alert – catch-all for any interaction

Notes & Tips
⦁ Fresh > Retested: First touches generally score better and are labeled accordingly.
⦁ Context Matters: Combining HTF zones with trend and volume filters significantly improves selectivity.
⦁ Performance: Zone limits and periodic cleanup are built in. If you plot many HTFs with Aggressive mode, consider raising strictness or lowering max zones.

Disclaimer
This tool is for educational and analytical purposes only. It does not constitute financial advice, nor does it guarantee outcomes. Trading involves risk; use proper risk management and your own judgment.

Nota Keluaran
Update: Applied minor bug fixes and performance improvements for smoother zone detection and display

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.