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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.