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.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.