QUOTE:
Build 105 - November 22, 2024
○ Added: FIR standard indicator
That's great! Now how do I find this "standard" FIR indicator that was added in Build 105? A search for "FIR" under indicators doesn't seem to location it. Is it really there?
This is not to be confused by the "original" WL FIR indicator that scales the filter coefficients, which is not standard.
Rename
The FIR in the indicators folder was added by Cone and the source code comment is "FIR standard indicator" so this one is meant to be the standard one. There is no other FIR in the indicators collection. Why do you say this one is not standard?
QUOTE:
Why do you say this one is not standard?
Excellent question. The existing WealthLab FIR filter is not standard because it doesn't follow the textbook definition of an FIR filter. In contrast, the Wikipedia definition does. Take a look at its sigma definition. https://en.wikipedia.org/wiki/Finite_impulse_response
Notice how the sigma definition doesn't manipulate or perturb the filter coefficients (That's the b's in this example.) in any way. That's for the DSP engineer and designer to do.
Moreover, DSP engineers (like myself) will commonly scale the filter coefficients so they add to zero. That's important because one doesn't want the FIR filter to alter the net amplitude of the output waveform. But if one does that with the nonstandard WL FIR filter, one gets a divide by zero, which makes it totally unusable. I would simply replace the WL FIR filter with its textbook definition.
Off topic, but you might want to overload the FIR call so one can pass a double array as the filter coefficients as well.
CODE:
IndicatorBase output = FIR.Series(source, new double[]{1.0,-1.0}); //take the 1st derivative
Your Response
Post
Edit Post
Login is required