Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

AFIRMA - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources - MetaTrader 5 Resources

author EAcpu | 2 reads | 0 comments |

AFIRMA - indicator for MetaTrader 5

Digital filter-based AFIRMA (Autoregressive Finite Impulse Response MA) displays price movements accurately, but with a time lag.

Moving averages are based on smooth function fits (polynomials or sine/cosine in Fourier transform) without lag, but generally show price movements not very well.

The proposed moving average smoothes price movements using a numeric filter on all candlesticks, except the latest, with an amount equal to the filter time lag. These candlesticks are smoothed by cubic spline fitting using the least squares method. The condition for the continuity of the combined moving average and its first derivative is set at the intersection of two moving averages. Therefore, we have a smooth moving average that tracks price accurately with no time lag.

Input parameters:

The first part of the MA built using digital filters is shown by the blue-violet curve. The second part of the MA constructed by cubic spline fitting is shown by the red curve.

AFIRMA - indicator for MetaTrader 5


Attachment download

📎 afirma.mq5 (8.92 KB)

Source: MQL5 #603

Verification code Refresh