In this bit of code:
IIRMA = Fraction * ( 2 * Series - Series[Lag] ) + ( 1 - Fraction ) * IIRMA[1];
The (2 * Series - Series[Lag]) adds a momentum component to the output, which reduces lag, but also increases noise too. Try using this bit of code:
IIRMA = Fraction * ( 0.5 * (Series+Series[1] )) + ( 1 - Fraction ) * IIRMA[1];
This puts a zero in the transfer response at the Nyquist frequency, thus improving attenuation ability of the filter at the expense of an increase in lag. To get less lag, use a shorter length. It's all a matter of trade-offs in what a filter will provide for you.
IIRMA = Fraction * ( 2 * Series - Series[Lag] ) + ( 1 - Fraction ) * IIRMA[1];
The (2 * Series - Series[Lag]) adds a momentum component to the output, which reduces lag, but also increases noise too. Try using this bit of code:
IIRMA = Fraction * ( 0.5 * (Series+Series[1] )) + ( 1 - Fraction ) * IIRMA[1];
This puts a zero in the transfer response at the Nyquist frequency, thus improving attenuation ability of the filter at the expense of an increase in lag. To get less lag, use a shorter length. It's all a matter of trade-offs in what a filter will provide for you.
They can be a starting point of a move, but so a certain percentage or any line can be it.