OPEN-SOURCE SCRIPT

Demand & Supply Zones Pro RBR / DBR / DBD / RBD [KTFL]

404
Demand & Supply Zones Pro — RBR / DBR + Volume Strength + TP/SL

Professional Demand & Supply indicator that automatically detects institutional accumulation and distribution zones using Rally-Base-Rally (RBR), Drop-Base-Rally (DBR), Rally-Base-Drop (RBD), and Drop-Base-Drop (DBD) price structures.

Unlike traditional Supply & Demand indicators that rely only on price action, this script also evaluates Volume Strength, generates a complete Entry / Stop Loss / Take Profit trading plan, and records trading statistics directly on the chart. The script is written entirely from scratch and is not derived from any existing TradingView indicator.

Features
✔ Automatic Demand & Supply Detection

The script automatically identifies the four classic institutional structures:

Rally → Base → Rally (RBR)
Drop → Base → Rally (DBR)
Rally → Base → Drop (RBD)
Drop → Base → Drop (DBD)

Each zone is confirmed only after a valid Leg-In, Base and Leg-Out sequence has completed, reducing false signals.

✔ Volume Strength Analysis

Every zone is graded using relative volume compared to the market average.

Features include:

Average Volume Comparison
Zone Grade (A / B / C)
Optional Grade A Filter
Volume Ratio Display
Volume-based Zone Coloring

This allows traders to quickly distinguish stronger institutional zones from weaker ones.

✔ Complete Trade Plan

When price revisits a valid zone, the indicator automatically calculates:

Entry Price
Stop Loss
Take Profit
Risk : Reward

Supported Entry Modes:

Zone Edge
Confirmation Close
Trigger Body

Supported Stop Loss Modes:

Zone Distal
ATR

Supported Risk Rewards:

1R
1.5R
2R
2.5R
3R
4R
5R
6R

Projected TP and SL levels can also be displayed before price revisits the zone.

✔ Smart Zone Management

The indicator automatically manages every zone by:

Extending active zones
Fading or deleting used zones
Detecting broken zones
Keeping only the latest zones
Preventing unnecessary clutter

Users can choose whether used zones remain visible or are removed automatically.

✔ EMA Trend Filter

An optional higher-timeframe EMA filter helps trade only in the direction of the dominant trend.

Available modes:

Price above/below EMA
EMA Slope
Both conditions

Users may also choose whether the filter blocks entries only or prevents counter-trend zones from being created entirely.

✔ Trading Statistics Dashboard

The built-in dashboard provides real-time statistics including:

Current Trend
Active Demand / Supply Zones
Average Volume Strength
Current Trade Status
Last Signal
Entry / SL / TP
Win Rate
Consecutive Losses
Total R Multiple
Daily Performance
Win Rate by Pattern (RBR, DBR, RBD, DBD)

This makes it easy to evaluate which market structures perform best over time.

✔ Trade History

Completed trades can optionally remain on the chart, allowing traders to review previous entries, exits and R-multiples.

Historical trades may include:

Entry
Stop Loss
Take Profit
Win / Loss Labels
Complete Trade Boxes

This is useful for reviewing strategy performance and studying historical setups.

✔ Alerts

Built-in alerts include:

New Demand Zone
New Supply Zone
Demand Retest
Supply Retest
Long Entry
Short Entry

These alerts can be connected to TradingView notifications or automated workflows.

No Repainting

The detection engine evaluates only confirmed candles after the full structure has formed. Signals are generated using completed price action rather than future information, helping to avoid repainting behavior.

Disclaimer

This indicator is designed as a trading decision-support tool and should not be considered financial advice. Always apply proper risk management before entering any trade.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.