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 open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?