#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

# Moving Average of a Moving Average

Is there a way to create a signal line for a moving average? Such as a moving average of a moving average?

## Comments

• edited May 2015
I just realized (maybe I forgot) that a moving average of a moving average is not a double smoothed moving average (correct me if I am wrong).

If EMAs are okay, then you could add a MACD indicator like MACD(1,20) or MACD(20,1) (can't remember which one, the second one I think). Next, in the advanced options, apply an EMA to the MACD line. MACD(20, 1) is read like this: the 20 period EMA minus the 1 period EMA. The 1 period EMA is the close. This results in a 19 period EMA. Someone, please correct me if I am wrong. I am unable to test ATM.

Just note that Moving Averages are lagging. Moving Average crossovers are lagging and not as great as claimed. Therefore, MA signal line crosses are lagging too.

There are several momentum indicators on SCC that have built in signal lines. These indicators are not MAs, they are momentum based indicators. They may use MAs in their calculation, however. I would recommend learning these and how to use them.

P.S. To my knowledge, double smoothed MAs do not exist specifically on SCC, but there is a way around it, which is to use the User-defined index.
• edited May 2015
correction pending.... please stand by...
• # CORRECTION:

In the chart above, the first indicator panel is the QQQ with price hidden, but showing a 20 period EMA.

The second panel is the MACD Histogram (20,0,0) with a 1 period EMA. This shows that it matches the first panel.

If you overlay the two panels, you will see that they are the same. Also, the values in the top left corners are the same.

The third panel is the second panel with a 9 period EMA instead of the 1 period EMA. So, this 9 period EMA is a moving average of the 20 period EMA. In other words, a signal line. So, when the MACD Hist crosses above the signal line, it is a buy signal.

Personally, I would use momentum based indicators with built in signal lines. It makes life much easier.

Here are the settings from the chart above:

You can change the indicator panel heights to 1 to help match with the main plot.

This is the only way I can think of creating a moving average (signal line) of a moving average.

I still have some lingering questions about MACD(20,0), etc. I may have to start a new post for that.
• # CORRECTION #2:

This quote taken from the above comment has an error in it:
If EMAs are okay, then you could add a MACD indicator like MACD(1,20) or MACD(20,1) (can't remember which one, the second one I think). Next, in the advanced options, apply an EMA to the MACD line. MACD(20, 1) is read like this: the 20 period EMA minus the 1 period EMA. The 1 period EMA is the close. This results in a 19 period EMA. Someone, please correct me if I am wrong. I am unable to test ATM.

Chart for reference:

Since EMAs are overlays, they are price based; meaning their value is a price that is derived from the security price.

MACD(X,Y) is a solid line defined as X - Y, where X and Y are EMAs. Closing prices are used. When you subtract the two, it is the values that get subtracted. These values are prices. Thus, the MACD line is a price spread of the two EMAs. Since a larger price can be subtracted from a smaller price, the price spread can go negative, which means the MACD line is negative. This is how MACD oscillates above/below the zero line.

Normally, when the MACD line is above zero, this means the faster EMA is above the slower EMA, which is interpreted as bullish. If the faster EMA is above the slower EMA, this would imply that the faster EMA would have a higher price than the slower EMA. This means the price spread would be positive. This is how the MACD line would be above the zero line.

So, MACD(20,1) is not a 19 period EMA: 20 period EMA minus the 1 period EMA. It is the price spread between the 20 period EMA and the close.

In the chart above, the 3 green indicators are the same. The 3 pink indicators are the same, but are the inverse of the 3 green indicators.

Here are the settings:

Please advise with comments and corrections.
• Please note second correction above. It got posted twice, sorry about that. It was flagged for admin approval.

I have some new MACD questions that I will post separately.
• Hi Kevo. I really appreciate the effort you put into this. I plan on using the MACD with the settings as you suggest. Is there a way to get STockcharts.com to add the MA feature though? What is the process to get this on their list of new features? Also, you mentioned that a MA is a trailing indicator and you prefer momentum indicators. I like momentum indicators as you suggest because they move before price, but they also often have false signals. So I prefer to trade using the moving average because it gives more time for a new trend to be confirmed by price. As they say, trade the market not the forecast. Thanks!!
• Hi Kevo. I tried using the MACD as you suggested. It really isn't giving me what I am looking for. Is there a way to get SC to add this feature?
• Yes of course you can request a feature. You can do it through the support form page. I have requested many things in the past - most are probably ignored. I usually title my request: "Feature Request"... something like that.

If there was demand for this feature, it would already be available. I doubt there is any demand for this feature. Another problem is that I have not seen it in the literature. If it does appear, it takes a back seat. Signal lines normally appear on momentum indicators, not MAs.

Here is my perspective on this:

Moving Average of a Moving average does not appear in the literature. If I am wrong, or you see it somewhere, please send me a link. What does appear in the literature is Double smooth and Triple-smooth Moving Averages and momentum based indicators. SCC has a triple smoothed MA, 1-period ROC indicator in TRIX. Also in the literature, you will find different types of MAs like Weighted MAs, and volume weighted MAs. You will also find MA crossovers: short-term crossing a medium or long-term MA. You will also find in the literature momentum based indicators with built in signal lines.

With all of these alternatives, and with no visibility in the literature, I can see why there would be no demand for this, and not to mention that MAs have other purposes too.
• You can add moving averages to indicators by clicking advanced options...but it appears you cannot do it on overlays.
Sign In or Register to comment.