[Spinn] Average True Range

The "Average True Range" indicator is a popular tool that measures price volatility. In this modified indicator, I present two methods of calculating ATR: the outdated classical one based on RMA (EMA, SMA, WMA), and the modernized one using the Super Smoother filter.

Why has exponential smoothing become outdated?
Exponential smoothing (EMA) has drawbacks, especially when it comes to identifying cyclical components in the data (and RMA is a variant of EMA). EMA creates phase shifts and distortions, making it less predictable and accurate in tracking real price movements. Modern filters, such as Super Smoother, offer a higher degree of adaptability and precision while ensuring significantly less lag, better smoothness, and superior cycle detection.

Why use more contemporary filters like Super Smoother?
The Super Smoother filter combines exponential smoothing and trigonometric functions for more accurate and smooth tracking of price movements. This filter enhances cycle tracking and reduces the lag often found when using EMA. As a result, signals based on Super Smoother are often more precise and representative of real price movements.

Drawbacks of other smoothing filters commonly used with ATR:
  • SMA. The lag is (N-1)/2, where N = period. This is terrible.
  • WMA. According to John F. Ehlers, "It appears that the WMA was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag". It has been proven that WMA has worse suppression than the equivalent SMA, and WMA has more delay in the passband than the equivalent EMA. In short, WMA has drawbacks but no advantages compared to other popular moving averages.

It is also a good idea to use the median to average the results.

Test, experiment, use!

Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?