Indicators: Averages composite trend

 

Averages composite trend:

Trend composed by a series of averages

Averages composite trend

Author: Mladen Rakic

 
Automated-Trading:

Averages composite trend:

Author: Mladen Rakic

In my opinion, this is just a waste of computational power and memory! The average of multiple Moving Averages is just another single Moving Average with an appropriate equivalent period. So, the Indicator is in essence just showing the difference between two Moving Averages.

It would be more efficient to just calculate the equivalent period first, in the OnInit(), for all of the multiple periods listed, and then just do the calculations on only two Moving Averages.

Better still, is for the user, not to even bother with making a list of multiple periods and just select two (a fast and a slow period), which ultimately, just brings as back to a very old and well know Indicator, namely the MACD (Moving Average Convergence/Divergence) and all its variants.

 

It is similar to MACD, but due to the multiple difference(s) calculations and accumulation of those, that is not and will not be a MACD (which, by definition of Gerald Appel, its inventor, is a difference of fast and slow EMA, hence nothing that is not a difference of only 2 EMAs is a MACD).

As of the rest : check your math prior to making a post

 
Mladen Rakic: It is similar to MACD, but due to the multiple difference(s) calculations and accumulation of those, that is not and will not be a MACD (which, by definition of Gerald Appel, its inventor, is a difference of fast and slow EMA, hence nothing that is not a difference of only 2 EMAs is a MACD). As of the rest : check your math before posting

Yes, I know the original MACD is based only on the Exponential Moving Average, but there are many variants of MACD that use different types of Moving Averages.

I did check the math before posting! As I stated, the average of multiple Moving averages, of the same type, will result in a single equivalent Moving Average (and the same applies to the average of the difference as well).

However, I am not trying to start a flame war. I just stated my opinion. Others can have a different opinion and it is their prerogative.

 
Mladen Rakic:

It is similar to MACD, but due to the multiple difference(s) calculations and accumulation of those, that is not and will not be a MACD (which, by definition of Gerald Appel, its inventor, is a difference of fast and slow EMA, hence nothing that is not a difference of only 2 EMAs is a MACD).

As of the rest : check your math prior to making a post

I decide to redo the math once more, and it seems my opinion does hold true for the most part but not for the SMA (Standard Moving Average).

It holds true for SMMA (Smoothed Moving Average), EMA (Exponential Moving Average) and LWMA (Linear Weighted Moving Average), but does not hold true for the SMA (Standard Moving Average).

So, my suggestion to improve the indicator's efficiency by calculating the equivalent period in the OnInit() is still valid for the types that do have a single equivalent possibility.

EDIT: For example, a period list of "2;3;8;21;34", for the EMA it would be equivalent to "2;8.193" and for the SMMA it would be equivalent to "2;7.472". I didn't do an example for the LWMA as the math is little more elaborate and I was to lazy to do it, but the EMA and SMMA is sufficient to illustrate the point.

EDIT2: Yes, I know that the iMA() function only uses Integer periods and not doubles, but that is failing of how the function was implemented and not of the underlying formula. Instead of iMA() one can use use a proper implementation as used for example in MetaQuote's own code sample "Custom Moving Average.mq5".

 

Thank you for your great job! I donot really understand the math behind it, but it's visual result is much more friendly to read as the MACD and its various modifications.

While the color of the line shows the upward/downward trend, could you please be so kind as to explain what does the histogram mean? The strength of the trend?

And what is the meaning of 0-line cross? 

Thank you in advance for your reply!

Visualize a Strategy in the MetaTrader 5 Tester
Visualize a Strategy in the MetaTrader 5 Tester
  • www.mql5.com
We all know the saying "Better to see once than hear a hundred times". You can read various books about Paris or Venice, but based on the mental images you wouldn't have the same feelings as on the evening walk in these fabulous cities. The advantage of visualization can easily be projected on any aspect of our lives, including work in the...
Reason: