OPEN-SOURCE SCRIPT
ATR Trend Band by Bybllo

ATR Trend Band by Bybllo
This indicator plots a smoothed trend line (the "rope") that only moves once price has traveled beyond an ATR-based threshold from its last position, so small back-and-forth noise is absorbed and the line only steps in the direction of a genuine move. Around that rope line, a stepped upper/lower band tracks the highs and lows of the current directional leg, and the space between the rope and each band is filled with a true color gradient — strong color near the band, fading to transparent near the rope — so the current trend direction and its "room" are visible at a glance. When the rope's direction flips, a short transition window is highlighted with its own color and an optional cloud, so brief reversals or whipsaws are visually distinguished from an established trend.
Key Features
ATR-threshold "rope" smoother: the center line only moves once price has moved beyond (ATR length × ATR multiplier) from the line's current value, filtering out minor noise while still reacting to genuine directional moves.
Stepped upper/lower band that resets to the current high/low on a fresh directional leg and then expands to track the extremes of that leg, with the opposite band computed as rope ± the ATR threshold.
True gradient cloud fill between the rope and each band, with an adjustable steepness control for how quickly the color fades toward the rope line.
Distinct up / down / transition coloring on the rope line and the outer band lines, so the current trend direction is clear without reading numbers.
Optional transition-zone cloud that highlights the short window right after a directional flip, before the new trend is considered established.
Real-price calculation via request.security() keeps the indicator consistent regardless of chart type (Heikin Ashi, Renko, etc.).
How to Use
Treat the rope line's color and slope as the current trend direction; a color change (through the transition color) signals a potential shift in direction.
Use the stepped band as a dynamic support/resistance reference for the current leg — price re-testing the band without breaking the rope's direction can be read as a continuation, while a rope flip against the band suggests the leg may be ending.
Lower the "Gradient Steepness" input for a shorter, more intense color burst near the band edges, or raise it for a smoother gradient spread across the full band width.
Turn on "Show Transition Cloud" if you want the brief post-flip window visually flagged, which can help you avoid reacting to whipsaws immediately after a direction change.
Adjust "ATR Length" and "ATR Multiplier" together to control how sensitive the rope is: a smaller multiplier reacts faster but flips more often, while a larger multiplier is slower but more stable.
Notes
The gradient fill relies on Pine's built-in fill() gradient feature, which is supported across all account tiers (free and paid).
The transition window auto-clears after 5 bars if the rope has not resumed its prior direction, so it always reflects a short, recent window rather than an indefinitely "stuck" state.
This indicator plots a smoothed trend line (the "rope") that only moves once price has traveled beyond an ATR-based threshold from its last position, so small back-and-forth noise is absorbed and the line only steps in the direction of a genuine move. Around that rope line, a stepped upper/lower band tracks the highs and lows of the current directional leg, and the space between the rope and each band is filled with a true color gradient — strong color near the band, fading to transparent near the rope — so the current trend direction and its "room" are visible at a glance. When the rope's direction flips, a short transition window is highlighted with its own color and an optional cloud, so brief reversals or whipsaws are visually distinguished from an established trend.
Key Features
ATR-threshold "rope" smoother: the center line only moves once price has moved beyond (ATR length × ATR multiplier) from the line's current value, filtering out minor noise while still reacting to genuine directional moves.
Stepped upper/lower band that resets to the current high/low on a fresh directional leg and then expands to track the extremes of that leg, with the opposite band computed as rope ± the ATR threshold.
True gradient cloud fill between the rope and each band, with an adjustable steepness control for how quickly the color fades toward the rope line.
Distinct up / down / transition coloring on the rope line and the outer band lines, so the current trend direction is clear without reading numbers.
Optional transition-zone cloud that highlights the short window right after a directional flip, before the new trend is considered established.
Real-price calculation via request.security() keeps the indicator consistent regardless of chart type (Heikin Ashi, Renko, etc.).
How to Use
Treat the rope line's color and slope as the current trend direction; a color change (through the transition color) signals a potential shift in direction.
Use the stepped band as a dynamic support/resistance reference for the current leg — price re-testing the band without breaking the rope's direction can be read as a continuation, while a rope flip against the band suggests the leg may be ending.
Lower the "Gradient Steepness" input for a shorter, more intense color burst near the band edges, or raise it for a smoother gradient spread across the full band width.
Turn on "Show Transition Cloud" if you want the brief post-flip window visually flagged, which can help you avoid reacting to whipsaws immediately after a direction change.
Adjust "ATR Length" and "ATR Multiplier" together to control how sensitive the rope is: a smaller multiplier reacts faster but flips more often, while a larger multiplier is slower but more stable.
Notes
The gradient fill relies on Pine's built-in fill() gradient feature, which is supported across all account tiers (free and paid).
The transition window auto-clears after 5 bars if the rope has not resumed its prior direction, so it always reflects a short, recent window rather than an indefinitely "stuck" state.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.