handsheik

FIR Trend Filter (Sawtooth and Square Waves)

Experimental script!

Using sigma approximation with Sine wave to form Sawtooth and Square waves, for a Finite Impulse Response filter.
Higher harmonics make the sawtooth or square wave more "exact", at the expense of more computation. It also makes the filter more "sensitive". I wouldn't exceed 100, but you're the boss.
The default number of harmonics is 20. The length is 20, too. Why? Because we are currently in 2020. Silly, I know.

Feel free to play around with the settings and tune it to your liking.
How to use it is pretty straight forward: Green is trend-up and red is trend-down.

Credit to alexgrover for the template.
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?