I use two variations of the 2nd order Infinite Impulse Response Filter[the IIR2], as analytically exposed in Amibroker 4.40 Users Guide, AFL Reference Manual, User-definable Functions.
Here is the full code
function IIR2( input, f0, f1, f2 )
{
result[ 0 ] = input[ 0 ];
result[ 1 ] =...