Moving averages are technical indicators that investors often use in the stock market. A moving average (MA) represents the sum of the closing prices of a security over a specific number of periods, which is then divided by the total number of periods. A moving average is depicted as a line chart that is superimposed over a stock's price action.

Once a moving average is calculated and plotted on a chart, it can be a powerful visual trend-spotting tool. If a moving average is rising, it can signal that a stock is in an uptrend. Conversely, when a moving average is falling, it can signal that a stock is in a downtrend. Let's look at this indicator and how it can help investors follow trends toward greater profits.

You will often hear about three types of moving averages: simple, exponential, and linear. The best place to start is by understanding the most basic: the simple moving average (SMA).

- Moving averages are technical indicators that are often used by investors in the stock market.
- A moving average represents the sum of the closing prices of a security over a set number of periods and is then divided by the total number of periods.
- Using the 50-day and 200-day moving averages together represent powerful trading signals in the market.
- Typically, the cross of a stock's 50-day above its 200-day moving average is a major signal that the stock has begun an uptrend.
- Conversely, a stock's 50-day cross below its 200-day MA can signal a downtrend and is often called the death cross.

## Trendlines

There can be no complete understanding of moving averages without an understanding of trends. A trend is simply a price that is continuing to move in a certain direction. There are only three real trends that securities can follow:

- An uptrend, or bullish trend, means that the price is moving higher.
- A downtrend, or bearish trend, means the price is moving lower.
- A sideways trend, where the price is moving sideways.

The important thing to remember about trends is that prices rarely move in a straight line. Therefore, moving-average lines are used to help a trader more easily identify the direction of the trend.

## Moving Average Construction

The textbook definition of a moving average is an average price for a security using a specified time period. Let's take the very popular 50-day moving average as an example. A 50-day moving average is calculated by taking the closing prices for the last 50 days of any security and adding them together. The result from the addition calculation is then divided by the number of periods, in this case, 50. To continue to calculate the moving average on a daily basis, replace the oldest number with the most recent closing price and do the same math.

No matter how long or short of a moving average you are looking to plot, the basic calculations remain the same. The change will be in the number of closing prices you use. So, for example, a 200-day moving average is the closing price for 200 days summed together and then divided by 200. You will see all kinds of moving averages, from two-day moving averages to 250-day moving averages.

It is important to remember that you must have a certain number of closing prices to calculate the moving average. If a security is brand new or only a month old, you will not be able to do a 50-day moving average because you will not have a sufficient number of data points.

Also, it is important to note that we've chosen to use closing prices in the calculations, but moving averages can be calculated using monthly prices, weekly prices, opening prices, or even intraday prices.

The chart above is an example of a simple moving average on a stock chart of Google Inc. (Nasdaq: GOOG). The blue line represents the stock price, while the orange line represents the 50-day moving average.

The chart shows that the trend began moving higher after May of 2020 and into 2021. The price of Google shares fell below the 50-day moving average a few times (highlighted in red) and broke above the 50-day on five major moves (highlighted in green).

When the price crosses below a moving average, it suggests that the bears are in control of the price action and that the asset will likely continue its move lower. Conversely, a cross above a moving average suggests that the bulls are in control and that the price may continue its move higher in the coming days or weeks.

## Using Moving Averages for Trading Entries

Many traders use moving averages to identify a current trend and as an entry and exit strategy. One of the simplest strategies relies on the crossing of two or more moving averages. The basic signal is given when the short-term average crosses above or below the longer-term moving average. Two or more moving averages allow you to see a longer-term trend compared to a shorter-term moving average; it is also an easy method for determining whether the trend is gaining strength or if it is about to reverse.

The chart above uses two moving averages, one long-term (50-day, shown by the orange line) and the other shorter-term (15-day, shown by the yellow line). This is the same Google chart shown in the first chart, but with the two moving averages to illustrate the difference between the two lengths.

You'll notice that the 50-day moving average is slower to adjust to price changes because it uses more data points in its calculation. On the other hand, the 15-day moving average quickly responds to price changes because each value has a greater weighting in the calculation due to the relatively short time horizon.

In this case, by using a cross strategy, you would watch for the 15-day average to cross below the 50-day moving average as an entry for a short position. Conversely, you would watch for the 15-day average to cross above the 50-day moving average to enter a long position.

## Support and Resistance

Support and resistance, or ceilings and floors, refer to the same thing in technical analysis.

- Support is established when a price is trending downward. There is a point at which the selling pressure subsides, and buyers are willing to step in. In other words, a floor is established.
- Resistance happens when a price is trending upward. There comes a point when the buying strength diminishes, and the sellers step in. This would establish a ceiling.

In either case, a moving average may be able to signal an early support or resistance level. For example, if a security is drifting lower in an established uptrend, it wouldn't be surprising to see the stock find support at a long-term 200-day moving average. On the other hand, if the price is trending lower, many traders will watch for the stock to bounce off the resistance of major moving averages (50-day, 100-day, 200-day SMAs).

The chart above shows GOOG with its 200-day moving average (purple line) along with the 50 and 15-day moving averages. We can see the stock price find support (a bounce) off the 200-day in late September and early October of 2020.

Using the 50-day and 200-day moving averages together represent powerful trading signals in the market. Typically, the cross of a stock's 50-day above its 200-day moving average is a major signal that the stock has begun an uptrend. Conversely, when a stock's 50-day crosses below the 200-day moving average, this can signal a new downtrend and is often referred to as the death cross.

The chart above shows that the 50-day moving average for GOOG crossed above its 200-day in June of 2020, which led to an uptrend. However, it's important to note that moving averages represent historical closing prices and do not necessarily predict future price performance. Sometimes, moving averages can lag the market in situations when a stock price makes a volatile move higher or lower, and the moving averages have yet to catch up to the move in the stock's price.

## Bottom Line

Moving averages are powerful tools. A simple moving average is easy to calculate, which allows it to be employed fairly quickly and easily. A moving average's greatest strength is its ability to help a trader identify a current trend or spot a possible trend reversal. Moving averages can also identify a level of support or resistance for the security or act as a simple entry or exit signal. How you choose to use moving averages is entirely up to you.