[REPOST] Indicators: 3 Different Adaptive Moving Averages

*** NOTE: This is a repost with updated scripts to workaround the recent script engine changes ****

As the volatility rises, all Adaptive Moving Averages (AMA) become more sensitive and adapt faster to the price changes. As the volatility decreases, they slow down significantly compared to normal EMA . This makes it an excellent choice for detecting ranging markets (look for horizontal lines).

I have included 3 AMAs here:
- Kaufman's AMA. This makes use of Kaufman's Efficiency Ratio as the smoothing constant.
- Adaptive RSI . This adapts standard RSI to a smoothing constant.
- Tushar Chande's Variable Index Dynamic Average ( VIDYA ). This uses a pivotal smoothing constant, which is fixed, and varies the speed by using a factor based on the relative volatility to increase or decrease the value of SC .

For reference, I have plotted an EMA (10). This uses a fixed smoothing constant.

This is my 25th indicators post (Yayy!), so decided to include a bunch of AMAs. Enjoy :)

Feel free to "Make mine" and use these in your charts. Appreciate any comments / feedback.

List of my free indicators:
List of my indicators at Appstore:
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
// @author LazyBear
// v2 - updated the scripts to workaround function array indexing issues in the latest TV engine. 
// v1 - initial
study(title = "Kaufman Adaptive Moving Average [LazyBear]", shorttitle="KAMA2_LB", overlay=true)
amaLength = input(10, title="Length")

noise=sum(diff, amaLength)
efratio=noise!=0 ? signal/noise : 1

kama=nz(kama[1], close)+smooth*(close-nz(kama[1], close))
plot( kama, color=green, linewidth=3)