Attachments forums

List of attachments posted on this forum.


All files on forums: 135296

Re: Moving Average indicators for MT4

Jimmy, Sun Jun 23, 2019 11:02 pm

Here are the two Adaptive Smoothing indicators by Mladen that were coded for MT4 which were very interesting codes that deserve a spot in our Moving Averages thread.

As explained by Mladen:
Some time ago, as an answer to one question in an email regarding something called "3rd generation ma", I answered that it is not difficult to make a faster moving average, but that it is difficult to make a faster usable moving average.

This is one kind (one variation) of an adaptive EMA I have been playing with. It is adapting by measuring its previous errors and if the error raises, it speeds up, otherwise it is staying in a slower (smoother) phase. So, in short, if it made an error on previous attempt it adapts on new attempt in order to make the error as little as it can. Here is an example of a 14 period smoothed average with the average on a main chart and alphas it applied (smoothing constants) to average calculation in the sub-window

As you can see, when the market gets more volatile, it uses higher alpha values (which means faster response to price changes) and vice versa. Now, the "trouble" is that it is almost too good in adapting. Here is an example of a 50 period average and 50 period alpha.

As it is obvious, even with longer period error checking, it is adapting (minimizing previous errors and that way preventing previous error accumulation) so well that it is impossible to cause significant lag, and that way we can not use this one as usual moving averages. It can be used as a rather good filter (it is simple to use, it can be adapted easily to work on any value,... ), but as a "classical" moving average, due to it being "too fast" ... well, I leave that to users :)
All files in topic