OPEN-SOURCE SCRIPT
Block-Based Trend Breakout (UTB/DTB) & S/R Zones

This indicator is designed to detect potential trend reversals or volatility bursts by analyzing price action structured into "blocks." Its primary goal is to capture the earliest signals that a defined trend structure is weakening or breaking.
Signal Generation:
🛠️ Key Settings
If you find this useful please reach out and let me know how you use it as it's fairly unique... and thus different than anything I've ever seen or used.
Signal Generation:
- 🟢 DTB (Downtrend Breakout): When a confirmed downtrend is identified (e.g., price has been falling for 2 blocks), the indicator waits for the price to break above the highest high of the last completed block in that trend. When this break occurs, it signals a potential bullish reversal with a green DTB triangle below the bar.
- 🔴 UTB (Uptrend Breakdown): When a confirmed uptrend is identified (e.g., price has been rising for 2 blocks), the indicator waits for the price to break below the lowest low of the last completed block. When this break occurs, it signals a potential bearish reversal with a red UTB triangle above the bar.
🛠️ Key Settings
- Block Size (bars): The number of bars in each block used to analyze the trend structure. Lower values track short-term trends; higher values track long-term trends.
- Trend Confirmation (steps): The minimum number of consecutive blocks required to "confirm" a trend.
- Tolerance: Allowed Off-Trend Steps: The number of "noise" blocks allowed while confirming a trend.
- Show Support/Resistance Zones: Toggles the histogram-based S/R zones on or off.
- S/R Lookback (blocks): Determines how many blocks to look back for calculating S/R zones.
- S/R Zone Width (in ATR): Sets the thickness of the S/R zones, denominated in ATRs.
If you find this useful please reach out and let me know how you use it as it's fairly unique... and thus different than anything I've ever seen or used.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。