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

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?