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.
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.