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

Henderson Filter - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources - MetaTrader 5 Resources

author EAcpu | 2 reads | 0 comments |

Henderson's Filter - indicator for MetaTrader 5

Henderson's MetaTrader 5 filter. According to the brief description:

What is the Henderson Trend Filter?

Henderson filters are a widely used set of trend filters or smoothers. They were originally derived by Robert Henderson (1916) for use in actuarial work. They are also used in the X-11 family of seasonally adjusted packages, such as X-12-ARIMA. Henderson filters can be used on their own, for example by the Australian Bureau of Statistics using their seasonally adjusted estimates to calculate trend estimates.

Henderson derived the requirements for filters that they must obey local cubic polynomials without distortion. The Henderson filter is derived by minimizing the sum of squares of the third difference of a moving average sequence. Henderson's criterion ensures that when these filters are applied to cubic polynomials, the resulting smoothed output will exactly fit these parabolas. Henderson filters are suitable for smoothing economic time series because they allow the typical period of the trend to remain unchanged. They also have properties that eliminate virtually all irregular changes that occur with a frequency of six months or less.

The filter weights applied in the middle of the time series are symmetric, while the end filter weights are asymmetric. This is due to the standard endpoint problem, where there is not enough data on either side of the data points at the beginning and end of the series to generate symmetric filter weights. In practice, this effect can be reduced by generating separate forecasts and then applying symmetric filter weights, for example by using the ARIMA method.

More information can be found here .

Henderson's Filter - indicator for MetaTrader 5

PS: Please note that Henderson's filters are from the center smoother family, i.e. they recompute the half-periodic bars.


Attachment download

📎 hendersonds_filter.mq5 (7.85 KB)

Source: MQL5 #21605

Verification code Refresh