OPEN-SOURCE SCRIPT
Cập nhật Advanced S&D Engine | ZikZak-Trader30

About This Script
This is a fully custom-built Supply & Demand Zone detection engine for TradingView written by ZikZak-Trader30 (Kotdwar, UK). The script identifies potential key supply and demand zones based on market structure and pattern logic widely used by professional traders.
Detected Patterns:
RBR (Rally-Base-Rally, demand)
DBD (Drop-Base-Drop, supply)
RBD (Rally-Base-Drop, supply)
DBR (Drop-Base-Rally, demand)
Features Highlight
Detailed configurable zone filtering (freshness, gap detection, time spent, width, Fibonacci confluence, etc.)
Fair and adjustable scoring system for zone strength
Automatic management/removal of old or retested/violated zones
Optional Fibonacci level confluence and dynamic labeling
Transparency Statement
How It Works:
This script uses well-known price action concepts and compares candles’ movement, consolidation, and breakout patterns to mark S&D zones.
There are no repaints or future leaks: all logic is based entirely on historical and current bars.
Parameters and variables are fully described in the script inputs. The zone scoring and removal logic is also visible in the code for transparency.
IMPORTANT: Usage & Fair-Use Policy
This script is provided for educational and informational purposes only.
It should not be considered as financial advice or a trading signal.
Trading/investing involves risk—always do your own research or consult a financial advisor before making trading decisions.
Past performance or backtest results are not necessarily indicative of future results.
License & Fair Use
The code is original, written by ZikZak-Trader30.
All logic and comments are visible for users to study, adapt, or improve for personal, non-commercial use within TradingView.
You may NOT resell, repackage, or repost this script as your own.
If you fork or publicly remix/adapt the script, please credit "ZikZak-Trader30" and do not remove this disclosure section.
If you use ideas or snippets, kindly reference this script and author.
Absolutely NO plagiarized or resold code is permitted. This script is not for re-sale.
Acknowledgements
This indicator was inspired by years of price action study and usage of public S&D scripts. While the pattern logic is classic in nature, the version and scoring are original.
No proprietary datasets or paid logic from other sources are included.
Minor ideas on zone freshness and Fibonacci blending are common in the TradingView S&D community and have been custom-implemented here.
This is a fully custom-built Supply & Demand Zone detection engine for TradingView written by ZikZak-Trader30 (Kotdwar, UK). The script identifies potential key supply and demand zones based on market structure and pattern logic widely used by professional traders.
Detected Patterns:
RBR (Rally-Base-Rally, demand)
DBD (Drop-Base-Drop, supply)
RBD (Rally-Base-Drop, supply)
DBR (Drop-Base-Rally, demand)
Features Highlight
Detailed configurable zone filtering (freshness, gap detection, time spent, width, Fibonacci confluence, etc.)
Fair and adjustable scoring system for zone strength
Automatic management/removal of old or retested/violated zones
Optional Fibonacci level confluence and dynamic labeling
Transparency Statement
How It Works:
This script uses well-known price action concepts and compares candles’ movement, consolidation, and breakout patterns to mark S&D zones.
There are no repaints or future leaks: all logic is based entirely on historical and current bars.
Parameters and variables are fully described in the script inputs. The zone scoring and removal logic is also visible in the code for transparency.
IMPORTANT: Usage & Fair-Use Policy
This script is provided for educational and informational purposes only.
It should not be considered as financial advice or a trading signal.
Trading/investing involves risk—always do your own research or consult a financial advisor before making trading decisions.
Past performance or backtest results are not necessarily indicative of future results.
License & Fair Use
The code is original, written by ZikZak-Trader30.
All logic and comments are visible for users to study, adapt, or improve for personal, non-commercial use within TradingView.
You may NOT resell, repackage, or repost this script as your own.
If you fork or publicly remix/adapt the script, please credit "ZikZak-Trader30" and do not remove this disclosure section.
If you use ideas or snippets, kindly reference this script and author.
Absolutely NO plagiarized or resold code is permitted. This script is not for re-sale.
Acknowledgements
This indicator was inspired by years of price action study and usage of public S&D scripts. While the pattern logic is classic in nature, the version and scoring are original.
No proprietary datasets or paid logic from other sources are included.
Minor ideas on zone freshness and Fibonacci blending are common in the TradingView S&D community and have been custom-implemented here.
Phát hành các Ghi chú
This indicator identifies potential supply and demand areas on the chart by analyzing sequences of consolidation candles (base candles) followed by an impulsive price move.The zones are based on the price range of the base candles and help visualize areas where price previously paused before moving strongly in one direction.
Each zone is automatically managed and updated:
The zone fades visually after each retest.
Zones are removed when the price breaks through them or when they exceed their maximum age.
Users can define how many times a zone can be retested before removal.
The purpose of this indicator is to help traders study how price interacts with prior consolidation areas.
It is intended for technical analysis and educational purposes only.
How It Works
The indicator detects a base when one or more consecutive candles have small bodies relative to their total range.
A strong bullish or bearish candle following the base is classified as an impulsive move.
The zone is drawn using the high and low of the base candles.
When the price revisits the zone, its transparency increases to indicate reduced relevance.
Zones can expire based on age, number of touches, or violation of their boundaries
Phát hành các Ghi chú
This indicator automatically identifies supply and demand zones using a simple three-step price action model:1️⃣ Base Candle — A small-bodied candle that signals a pause in price movement.
2️⃣ Leg-Out Candle — A strong impulsive candle that breaks above or below the base candle’s range.
3️⃣ Confirmation Candle — A follow-through candle that closes beyond the breakout, confirming institutional strength.
Once confirmed, the script marks a demand zone (green) or supply zone (red) anchored from the base candle’s high/low.
All zones are non-repainting, drawn after the confirmation candle closes, and managed dynamically with:
Automatic fade on each retest,
Optional removal when violated,
Expiration after user-defined age or touch count.
⚙️ Features
ATR-based impulse detection (auto-adapts to volatility)
Adjustable body-size filter for base candles
Configurable zone lifespan, touch limit, and transparency
Clear visual markers for base, leg-out, and confirmation candles
100 % non-repainting logic (zones appear only after confirmation closes)
🎯 How to Use
Demand Zones (Green): Appear after bullish base-break-confirmation sequences.
Supply Zones (Red): Appear after bearish base-break-confirmation sequences.
Combine with structure, trend, and volume context for best results.
Works across all timeframes and markets (Forex, Crypto, Stocks, Futures).
⚠️ Disclaimer
This script is for educational and technical analysis purposes only.
It is not financial advice and should not be used to make trading decisions without proper risk management.
Always test on a demo or backtest environment before live use.
🧩 Credits
Developed & Published by ZikZak-Trader30
© 2025 All Rights Reserved — Educational Use Only.
Reposting or resale without permission is prohibited.
Phát hành các Ghi chú
Added fair value gap conformation Phát hành các Ghi chú
Now you can add alerts on the zones Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.