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!

Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?