OPEN-SOURCE SCRIPT
Demand & Supply Zones Pro RBR / DBR / DBD / RBD [KTFL]

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.
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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Korn Trade For Live
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Korn Trade For Live
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.