You are here

Moving Averages (MA)

Printer-friendly versionPDF version

The moving average, or simple moving average, represents the average of the last several closing prices. The moving average is simple to compute, easy to understand, and reliable under tests. This simplicity is the strength of the moving average.

The basic moving average is computed the same as any other mathematical average. The most common way of determining the moving average of a market is to take the closing price over a certain number of days, add them together, and divide by the select number of days.

Moving averages are generally thought to be indicators of a trend. For example, conventional interpretation is that once prices cross from below the moving average to above it, the trend is considered up. On the other hand, if prices go from above the moving average to below it, the trend of the market is considered down.

The purpose of the simple moving average is to track the progress of the trend. Moving averages can potentially keep you in the trend for a long time. The moving average gives you an indication of the trend being up (prices above the moving average) or down (below the moving average). However, the moving average gives you no indication of the length or duration of the trend.

Double Moving Average

Double moving averages use two different averages in tandem. The first average is generally a faster reacting average using a shorter period of time, usually 10 days. The second average is a slower reacting average that will indicate longer-term price movement.

Using these two averages together helps to alleviate whipsaws by giving a basis of comparison. The faster average breaking above the slower average is a buy signal, the faster average breaking below the slower average is a sell signal.

When using two different moving averages the trader gets a clearer picture of price indications. By combining a slower moving 20-day average, with a quicker reacting 10-day average, you can see where the long-term indications are going.

You would sell once the faster moving average crosses below the slower trend because that’s an indication of a change in trend. Near-term prices should be rising at a greater rate than longer-term prices in a good upward trending market, and vice versa for a downtrend.

Triple Moving Average

The system of triple moving averages is employed by plotting three different moving averages together. The first of these averages is a faster average that only looks at the short-term price direction. The second average is a medium average that reacts to a longer period of time, but not as long as the final average. The third average is the slowest to react because it takes an average of the longest period of time.

A 10, 20, and 40-day moving average system would be considered a triple moving average. The first average, the 10-day, is the quickest to move when prices show a change. The second average, the 20-day, is the medium average that does not show change until the prices have moved for a longer period of time. Finally, the slowest moving of the averages is the 40-day. This slow average will not indicate a difference until prices have made a significant move. Shorter-term moving averages, being more sensitive to changes in price, are said to follow the trend more closely. The middle or medium average would follow less closely and the slowest or least sensitive average would lag the most.

The use of the triple moving average is to buy when all three averages move to be in an upward trend or to sell when these averages are in a downtrend. The upward trend appears when the fastest average is higher than both of the other averages, the medium is above the slowest, and the longer term moving average is on the bottom.

This look would be reversed for a strong downtrend with slow average on top, followed by the medium average, and the fastest on the bottom.


Simple Calculation:

Mat = (P1 +... + Pn) / n

Mat: The moving average for the current period.
Pn: The price for the nth interval.
n: The length of the moving average.

Compute the average of the past n intervals using the price specified for that period. Now use real values to compute a five interval moving average. If you assume the following prices, the calculations are here:

MA = (7380 + 7375 + 7385 + 7390 + 7395) / 5
= 36925 / 5
= 7385

Linearly Weighted Calculation:

Mat = [(P1 x (n –1)] + …+ [Pn x (n – n)]
Denom = n + n-1 + n-2 +…+ 1

MA = Mat / Denom

n: The length of the moving average.
Pn: The price for the nth interval.
MA: The moving average for the current period.

Exponential Calculation:

fPerc = 2 / (n + 1)
MAt = (P x fPerc) + [MA(t-1) x (1 – fPerc)]

MA: The moving average for the current period.
t: The current time period.

Hull Moving Average Calculation:

  1. Calculate a Weighted Moving Average with period n / 2 and multiply it by 2

  2. Calculate a Weighted Moving Average for period n and subtract if from step 1

  3. Calculate a Weighted Moving Average with period sqrt(n) using the data from step 2

HMA= WMA(2*WMA(n/2) − WMA(n)),sqrt(n))

Max Average Calculation (found below moving average 6):

Max Ave. = Sum of  ( nclose * npos ^ pow ) / sum of ( npos ^ pow )

npos: position in the period, starting at 1
nclose: close of the bar at npos
pow: Max Average Power

Buy / Sell Signals

Moving Average signals are calculated from the first 2 moving average lines. A buy signal occurs after the Moving Average 1 moves above Moving Average 2. A sell signal occurs after the Moving Average 1 moves below Moving Average 2.

Example of Moving Averages

Moving Averages Example 


To open the Moving Averages Preferences click on the QuickLink (MA) in the lower right of the chart. Or you can right-click, select Overlay Properties and then Moving Averages. If you click on the chart, the Preferences tab will go back to chart settings.

1. Restore Settings: TNT Default will change your settings back to the original software settings. My Default will change current settings to your personalized default settings. Apply To All Charts will apply your selected settings to all Moving Averages overlays on all open charts. Save As My Default will save your current personal settings.

2. Moving Average Toggle: Select to turn on each moving average line. There are 6 moving averages and a max moving average. 

3. Line: Choose the color, line style, and line thickness of each of your moving averages lines. 

4. Period: Indicates the number of bars to be used in the calculation of the moving average. 

*To add an Offset, add a second number in the period box (with only a space between the two numbers, add a minus sign for negative displacement). This offsets the drawn moving average line forward or backward. It is not recommended to use offset when using Buy / Sell Arrows of the first 2 moving averages.

5. Type: Change the type of the Moving Average line to simple, linear weight, Hull or exponential. See under Calculation above for details about each of these types. 

6. Data: Choose either open, high, low, or close as the data used in calculating the moving average.

7. Buy / Sell Arrows: Toggle Buy / Sell Arrows for the first 2 moving averages to either be displayed or not displayed. Choose the color of these arrows. See above under Buy / Sell signals for how these are calculated. It is not recommended to use offset of the first 2 moving averages when using these signals.

8. Toggle Max Average: This moving average has the customizable line and period but with no offset available and no Type or Data. To see how this is calculated look for Max Average in the Calculation Section above.

9. Max Average Power: Adjust the exponent that the max average calculation uses.