Autonomous Recursive Moving Average


People often ask me what is my best indicators, i can't really respond to this question with a straight answer but i would say you to check this indicator. The Autonomous Recursive Moving Average (ARMA) is an adaptive moving average that try to minimize the sum of squares thanks to a ternary operator, this choice can seem surprising since most of the adaptive moving averages adapt to a smoothing variable thanks to exponential averaging, but there are lot of downsides to this method, i really wanted to have a flat filter during flat markets and this is what i achieved.

The Indicator

length control the amount of smoothing during trending periods, gamma is the trend sensitivity threshold, higher values of gamma will make an overall flat filter, adjust gamma to skip ranging markets.

gamma = 2, we can adjust to 3 while preserving smoothing reactivity with trading periods.

gamma = 3

low length and higher gamma create more boxy result, the filter add overshoots directly in the output, its unfortunate.

The Zero-Lag option can reduce the lag as well as getting additional flat results without changing gamma.


The indicator need work, but i can't leave without publishing it, the overshoots are a big problems, changing sma for another stable filter can help. I hope you find an use to it, i really like this indicator.

Thanks for reading
Script de código aberto

No verdadeiro espírito TradingView, o autor deste script o publicou com código aberto, para que os traders possam compreendê-lo e verificá-lo. Um brinde ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para utilizá-lo em um gráfico.

Quer usar esse script no gráfico?

Become a Patreon and get access to exclusive technical indicators!

You can also check out some of the indicators I made for luxalgo :