A moving average helps cut down the amount of "noise" on a price chart. Look at the direction of the moving average to get a basic idea of which way the price is moving. If it is angled up, the price is moving up (or was recently) overall; angled down, and the price is moving down overall; moving sideways, and the price is likely in a range.
A moving average can also act as support or resistance. In an uptrend, a 50-day, 100-day or 200-day moving average may act as a support level, as shown in the figure below. This is because the average acts like a floor (support), so the price bounces up off of it. In a downtrend, a moving average may act as resistance; like a ceiling, the price hits the level and then starts to drop again.
The price won't always "respect" the moving average in this way. The price may run through it slightly or stop and reverse prior to reaching it.
As a general guideline, if the price is above a moving average, the trend is up. If the price is below a moving average, the trend is down. However, moving averages can have different lengths (discussed shortly), so one MA may indicate an uptrend while another MA indicates a downtrend.
A moving average can be calculated in different ways. A five-day simple moving average (SMA) adds up the five most recent daily closing prices and divides it by five to create a new average each day. Each average is connected to the next, creating the singular flowing line.
Another popular type of moving average is the exponential moving average (EMA). The calculation is more complex, as it applies more weighting to the most recent prices. If you plot a 50-day SMA and a 50-day EMA on the same chart, you'll notice that the EMA reacts more quickly to price changes than the SMA does, due to the additional weighting on recent price data.
Charting software and trading platforms do the calculations, so no manual math is required to use a moving average.
One type of MA isn't better than another. An EMA may work better in a stock or financial market for a time, and at other times, an SMA may work better. The time frame chosen for a moving average will also play a significant role in how effective it is (regardless of type).
Common moving average lengths are 10, 20, 50, 100 and 200. These lengths can be applied to any chart time frame (one minute, daily, weekly, etc.), depending on the trader's time horizon.
The time frame or length you choose for a moving average, also called the "look back period," can play a big role in how effective it is.
An MA with a short time frame will react much quicker to price changes than an MA with a long look back period. In the figure below, the 20-day moving average more closely tracks the actual price than the 100-day moving average does.
The 20-day may be of analytical benefit to a shorter-term trader since it follows the price more closely and therefore produces less "lag" than the longer-term moving average. A 100-day MA may be more beneficial to a longer-term trader.
Lag is the time it takes for a moving average to signal a potential reversal. Recall that, as a general guideline, when the price is above a moving average, the trend is considered up. So when the price drops below that moving average, it signals a potential reversal based on that MA. A 20-day moving average will provide many more "reversal" signals than a 100-day moving average.
A moving average can be any length: 15, 28, 89, etc. Adjusting the moving average so it provides more accurate signals on historical data may help create better future signals.
Moving averages are calculated based on historical data, and nothing about the calculation is predictive in nature. Therefore, results using moving averages can be random. At times, the market seems to respect MA support/resistance and trade signals, and at other times, it shows these indicators no respect.
One major problem is that, if the price action becomes choppy, the price may swing back and forth, generating multiple trend reversal or trade signals. When this occurs, it's best to step aside or utilize another indicator to help clarify the trend. The same thing can occur with MA crossovers when the MAs get "tangled up" for a period of time, triggering multiple losing trades.
Moving averages work quite well in strong trending conditions but poorly in choppy or ranging conditions. Adjusting the time frame can remedy this problem temporarily, although at some point, these issues are likely to occur regardless of the time frame chosen for the moving average(s).