OPEN-SOURCE SCRIPT
ATR Channels 1-2-3

It is an overlay indicator that builds a system of channels around a moving average using ATR as the distance metric. The script first calculates a central moving average of the closing price, which can be either EMA or SMA depending on the selected parameter. This moving average acts as the axis of the channels and is independent of the ATR calculation.
Next, it computes the Average True Range using a separate period. The ATR is used directly as an absolute measure of price volatility, without additional smoothing or normalization.
Based on the central moving average and the ATR value, three pairs of bands are generated. The first channel is created by adding and subtracting one ATR from the moving average. The second channel is created by adding and subtracting two times the ATR, and the third channel by adding and subtracting three times the ATR. There is no conditional or adaptive logic involved; the distances are linear and strictly proportional to the current ATR value.
All lines are recalculated on every bar close. The script does not include signals, filters, or trading logic. It purely visualizes volatility-adjusted price envelopes around a reference moving average.
Next, it computes the Average True Range using a separate period. The ATR is used directly as an absolute measure of price volatility, without additional smoothing or normalization.
Based on the central moving average and the ATR value, three pairs of bands are generated. The first channel is created by adding and subtracting one ATR from the moving average. The second channel is created by adding and subtracting two times the ATR, and the third channel by adding and subtracting three times the ATR. There is no conditional or adaptive logic involved; the distances are linear and strictly proportional to the current ATR value.
All lines are recalculated on every bar close. The script does not include signals, filters, or trading logic. It purely visualizes volatility-adjusted price envelopes around a reference moving average.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.