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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.