Spinn29

[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!

Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?