PROTECTED SOURCE SCRIPT
Supply/Demand HTF (RBD/DBR) – FIX + Debug

Overview:
This indicator automatically detects and plots institutional supply and demand zones on any timeframe.
It analyzes price action to identify Drop-Base-Rally (DBR) and Rally-Base-Drop (RBD) structures — the core formations of supply and demand trading.
How It Works
1. The script scans price candles to detect “base” formations — small consolidation candles between impulsive moves.
2. When it finds a valid base followed by a strong move, it marks that area as:
• 🟩 Demand Zone (DBR): price dropped → consolidated → rallied upward
• 🟥 Supply Zone (RBD): price rallied → consolidated → dropped downward
3. Each detected zone is extended to the right so you can see if price returns to it later.
Color
Meaning
Description:
🟩 Green Zone
Demand
Institutional buy area (potential bullish reversal)
🟥 Red Zone
Supply
Institutional sell area (potential bearish reversal)
🟦 Blue Box
(Debug) HTF candle box used for internal analysis — can be hidden
🟡 Yellow Fill
Zone has been touched by price (reactivated)
Usage
• Works best when detecting zones from H4 or H1 and trading confirmations on M5 or M15.
• Ideal for institutional-style or “Smart Money Concepts” traders.
• Zones are auto-updated as new structures appear.
This indicator automatically detects and plots institutional supply and demand zones on any timeframe.
It analyzes price action to identify Drop-Base-Rally (DBR) and Rally-Base-Drop (RBD) structures — the core formations of supply and demand trading.
How It Works
1. The script scans price candles to detect “base” formations — small consolidation candles between impulsive moves.
2. When it finds a valid base followed by a strong move, it marks that area as:
• 🟩 Demand Zone (DBR): price dropped → consolidated → rallied upward
• 🟥 Supply Zone (RBD): price rallied → consolidated → dropped downward
3. Each detected zone is extended to the right so you can see if price returns to it later.
Color
Meaning
Description:
🟩 Green Zone
Demand
Institutional buy area (potential bullish reversal)
🟥 Red Zone
Supply
Institutional sell area (potential bearish reversal)
🟦 Blue Box
(Debug) HTF candle box used for internal analysis — can be hidden
🟡 Yellow Fill
Zone has been touched by price (reactivated)
Usage
• Works best when detecting zones from H4 or H1 and trading confirmations on M5 or M15.
• Ideal for institutional-style or “Smart Money Concepts” traders.
• Zones are auto-updated as new structures appear.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.