Technical analysis is the process of analyzing past and present price charts to predict the future direction of stocks and other securities in the market.
While investors often focus on fundamental ratios like price-to-earnings (P/E), sales growth, earnings growth, economic data, and the price-to-sales ratio to assess the market value, technical traders focus on analyzing price movements on charts. They look at price levels where other market participants are buying and selling. One of the most important tools in this analysis is moving averages.
In this article, we will explain how moving averages are calculated, how technical analysts use them for trading, the moving average crossover strategy, and how it can help traders decide when to buy and sell securities. Let’s begin by understanding what a moving average is.
What is the moving average and how is it calculated ?
In simple terms, a moving average is the average price of a security (like a stock or other asset) over a specific period of time. It helps smooth out price fluctuations by looking at the average price over a certain number of days, weeks, or months. This makes it easier to see trends and patterns in the price of the asset.
Moving averages are commonly used to spot trends and identify changing support and resistance levels. They are a straightforward technical analysis tool where an average price is calculated over a set period, such as 10 days, 20 days, 50 days, or any other period the trader decides. This helps traders understand the overall price movement more clearly.
To better understand how moving averages work, let’s go through a simple example of how they are calculated.
Let’s imagine a scenario where 7 people are asked to drink cold beverages. Each person drinks according to their own capacity and willingness. Here’s a list showing how much each person ends up drinking:
Person | No of Cold Beverages |
1 | 10 |
2 | 12 |
3 | 6 |
4 | 8 |
5 | 12 |
6 | 10 |
Total Number Of Cold Beverages Consumed | 58 |
As an analyst, you may not know exactly how many bottles of cold beverages each person drank. However, to get an estimate of the average number of bottles consumed, you can use a simple calculation. Simply divide the total number of bottles consumed by the total number of people. This will give you an idea of how many bottles, on average, each person drank.
In our example, the total number of cold beverages consumed is 58 bottles, and there are 6 people. To find the average number of bottles each person drank, we divide the total number of bottles by the number of people:
58 ÷ 6 = 9.667 bottles per person.
This means, on average, each person consumed 9.667 bottles of cold beverages.
Just like we estimated the average number of cold beverage bottles consumed per person, we can apply the same concept to calculate the moving average price of a stock.
Let’s say the closing prices of stock XYZ over the past 5 days were 100, 120, 95, 105, and 110 rupees. To calculate the 5-day simple moving average, we add up these 5 closing prices and divide by 5:
(100 + 120 + 95 + 105 + 110) ÷ 5 = 106.
So, the 5-day moving average of stock XYZ is 106 rupees.
This means the 5-day simple moving average takes the last 5 closing prices of the stock, adds them together, and divides by 5 to find the average. This value updates every day as new closing prices are added and older ones drop off.
After calculating the 5-day moving average price for each day, you can connect these values to create a smooth, continuous line. This line is often referred to as the moving average line.
For example, if you calculate the 5-day moving average for stock XYZ for multiple days, you would plot each average on a graph, with each point representing the moving average for a specific day. By connecting these points, you get a flowing line that helps visualize the trend of the stock’s price over time.
This line makes it easier to see the general direction of the stock’s price and helps identify patterns or trends, such as whether the stock price is generally going up or down.
You don’t need to do any manual calculations for the moving average, as charting software does all the work for you. In the software, the simple moving average appears as a smooth line on the chart, indicating the average price of the stock over the selected period. This is why it’s called the simple moving average (SMA).
You can apply the same concept to any time period, like a 200-day SMA. To calculate the 200-day SMA, you simply take the closing prices of the stock for the past 200 days and divide the sum by 200. The 200-day SMA is particularly useful for analyzing the long-term trend of a stock, helping investors understand if the stock is in an overall upward or downward trend.
Most Popular Moving Averages Used by Traders
Moving averages are commonly used by traders to help identify the market trend across different time frames. Traders typically use various lengths of moving averages to understand price movements. The most common moving average periods are 5, 8, 9, 10, 20, 21, 34, 50, 100, and 200 periods.
- 50, 100, and 200-day SMAs are favored by long-term traders. These longer moving averages help identify the broader market trend over extended periods.
- 5, 8, 9, 10, 20, and 21-day SMAs are more suited for short-term traders. These shorter moving averages allow traders to respond quickly to price changes and market shifts.
The most popular moving average among traders is the 20-period simple moving average. You’ll often see it on price charts, typically alongside candlestick charts or bar charts, as it provides a good balance between smoothing price action and reacting to changes.
In addition to the 20-period SMA, traders may also use 9, 34, 50, 100, and 200-period SMAs, depending on their specific trading strategy. For example, some traders prefer to use a 9-period SMA in place of the 5, 8, or 10-period SMA, depending on personal preference. Similarly, while 20-period SMA is common, many traders choose to use a 21-period SMA instead for its slight variation in smoothing.
These moving averages help traders identify trends and make informed decisions based on the timeframe that aligns with their trading style.
Moving Average Crossover
The moving average crossover is a popular method used by traders to determine when to enter or exit a trade. It occurs when a shorter-term moving average crosses over a longer-term moving average.
- When the shorter-term SMA (Simple Moving Average) crosses above the longer-term SMA, traders often go long (buy).
- When the shorter-term SMA crosses below the longer-term SMA, traders typically go short (sell).
Traders can test different combinations of short and long-term moving averages that best fit their trading time frames. This method helps to reduce the number of trades based purely on moving averages, ensuring that decisions are more thoughtful.
Popular SMA Combinations for Moving Average Crossover
Here are some commonly used SMA combinations in the moving average crossover system:
- 5/9 and 20/50 on a daily chart
- 5/9/20 and 100/200 on an intraday chart
The moving average crossover system is primarily a trend-following strategy, making it effective in trending markets. However, it may not perform well in tight range-bound or volatile markets, where price movements are erratic and unpredictable. This is why it’s important to back-test the system to understand how it works within your specific trading time frame.
Benefits of Back-testing Moving Average Crossover
One of the main advantages of back-testing the moving average crossover strategy is that it allows you to identify upswings and downswings in the market. This means you can potentially profit from both upward and downward market trends. In a strong trending market, using this system helps you stay on the right side of the trend and make the most of large market movements.
By back-testing, you can fine-tune your strategy to ensure it fits your preferred trading time frame and market conditions.
What Does a Moving Average Indicate on Price Charts?
A moving average is a tool used to smooth out price action on financial security charts. It helps traders focus on the current market price in relation to the average price over a set period, removing market noise. Essentially, the moving average helps show the trend of a stock or asset.
- If the simple moving average (SMA) line is sloping up, it indicates the stock price is moving up, meaning the market is in an uptrend. When the price is above the moving average, this confirms the uptrend.
- If the SMA line is angled down, it indicates the stock price is moving down, signaling a downtrend. When the price is below the moving average, it confirms the downtrend.
- If the moving average moves horizontally for an extended period, it suggests the stock price is in a sideways range, indicating a period of consolidation without a clear trend.
Moving Averages as Support and Resistance
- In an uptrend market, the moving average can act as a support level, meaning the price tends to bounce back up when it approaches the moving average.
- In a downtrend market, the moving average can act as a resistance level, meaning the price may struggle to rise above the moving average.
Moving Average Crossovers: Buy and Sell Signals
When the price crosses above or below the moving average, it signals a potential trend change. This is called a crossover.
- If the stock price crosses above the moving average, it indicates a buy signal (i.e., the stock may be starting to go up).
- If the stock price crosses below the moving average, it suggests a sell signal (i.e., the stock may be starting to go down).
Golden Cross and Death Cross
When using two simple moving averages (one shorter-term and one longer-term), their crossover can help indicate whether to buy or sell:
- Golden Cross: This occurs when the shorter-term SMA (e.g., 50-day) crosses above the longer-term SMA (e.g., 200-day), signaling a buy signal.
- Death Cross: This happens when the shorter-term SMA crosses below the longer-term SMA, signaling a sell signal.
For example, when you plot a 200-day and 50-day moving average on your chart:
- A buy signal occurs when the 50-day SMA crosses above the 200-day SMA (golden cross).
- A sell signal happens when the 50-day SMA drops below the 200-day SMA (death cross).
These crossovers help traders spot potential market shifts and adjust their strategy accordingly.
Simple vs. Exponential Moving Average (EMA) – Which is Better?
In technical analysis, one basic assumption is that “the market discounts everything.” This means that the latest stock price already reflects all known and unknown information. To calculate an Exponential Moving Average (EMA), more weight is given to the most recent closing prices, making it more sensitive and quicker to react to price changes.
Key Differences:
- Simple Moving Average (SMA): The SMA calculates the average of a set number of closing prices over a given period (e.g., 20 days) without putting more emphasis on any particular price. Every price in the period has equal weight.
- Exponential Moving Average (EMA): The EMA gives greater importance to the most recent prices, making it more reactive and faster to adjust to price changes as the security trades. It assigns higher weight to recent data, making it more sensitive to recent market movements.
You don’t need to manually calculate the EMA or figure out how much weight to assign to each closing price—charting software automatically does this for you.
Which is Better?
- The EMA is typically faster than the SMA because of its weighting system. This means EMA tends to provide quicker buy or sell signals, making it appealing for short-term traders looking for faster entries and exits.
- On the other hand, the SMA is smoother and gives a broader view of the overall price trend over time, which may be beneficial for those seeking a more stable, long-term perspective.
In summary, EMA is better for those who want more responsive signals and are focused on quicker price movements, while SMA can be better for those preferring smoother and less reactive signals over a longer period. The choice between SMA and EMA depends on the trader’s strategy and the time frame they are focusing on.
What Time Frames Can Moving Averages Be Used On?
Moving averages can be applied to any time frame, including daily, weekly, monthly, and even shorter time frames like 1 hour, 30 minutes, 15 minutes, 5 minutes, or any other intraday time frames that suit your trading strategy.
Time Frame Preferences for Trend Identification
- For trend identification, traders typically use moving averages on higher time frames, such as daily or weekly charts. This allows them to see how the market behaves on a broader scale.
- In an uptrend, prices tend to stay above the moving average, indicating strong buying momentum.
- In a downtrend, prices stay below the moving average, suggesting selling pressure and a bearish market.
Some commonly used moving averages—like the 9-period, 20/21-period, and 200-period SMA—are popular because they are followed by many market participants. These are considered key levels that traders look at for making decisions.
Limitations of Moving Averages
It’s important to remember that no indicator is perfect. Moving averages are helpful, but they don’t guarantee success in every market condition. No single technical indicator will lead to consistent profits. Therefore, while moving averages can help capture trends, they shouldn’t be seen as a “Holy Grail” for trading.
In tightly range-bound markets, where prices move within a narrow range, moving averages may not be as effective. They are generally better suited for trend-following strategies.
Using Moving Averages in Your Trading System
You should determine how to incorporate moving averages into your own trading strategy based on your preferred time frame and the market conditions you’re analyzing. They are useful tools for capturing trends, but should be combined with other analysis methods to build a robust trading system.
Using Moving Averages in Combination with Other Indicators
Many technical analysts use moving averages alongside other technical indicators and candlestick patterns to help make trading decisions. However, some traders prefer to trade without any indicators at all, relying solely on price action. This approach, known as “trading naked,” focuses purely on price movements and chart patterns without any additional tools.
Common Price Patterns and Indicators Used for Confirmation:
To confirm trends and signals, traders often combine moving averages with other technical tools and patterns, such as:
- Price Action Patterns: These include formations like Triangle, Head and Shoulders, Double Top and Double Bottom, Bull and Bear Flags, and Channels. These patterns help identify potential market reversals or continuation moves.
- Support and Resistance: Levels where prices tend to reverse or pause. These are crucial for setting entry and exit points.
- Trend Lines: Lines that connect highs or lows to help identify the overall market trend direction.
- Candlestick Patterns: Specific candle shapes or formations that signal bullish or bearish market sentiment.
Technical Indicators:
- Moving Average Convergence Divergence (MACD): Helps identify trend reversals and momentum.
- Relative Strength Index (RSI): Measures whether a stock is overbought or oversold.
- Bollinger Bands: Shows volatility and price levels relative to a moving average.
- Stochastics: Measures momentum and potential price reversals.
- Volume: Analyzes the number of shares traded to confirm the strength of a trend.
- Pivots: Helps identify potential turning points in the market.
- ADX (Average Directional Index): Measures the strength of a trend.
- Awesome Oscillator: A momentum indicator that shows market momentum strength.
- 3-10 Oscillator: Helps identify the strength of short-term price movements.
Moving Averages as a Lagging Indicator
It’s important to note that like most technical indicators, moving averages are considered lagging indicators. This means they react to past price data, not predict future movements. Because of this, many professional traders prioritize price action—the actual movement of prices—over technical indicators. Price action is often seen as the most direct reflection of market sentiment and trend.
In summary, while moving averages are valuable tools, they are often used in conjunction with other indicators and chart patterns to increase their reliability and provide better trading decisions.
Understanding Price Action Through Candlestick Patterns
To truly understand price action, it’s crucial to read and interpret candlestick patterns and how they relate to the broader market context. Candlestick patterns provide insights into market sentiment and potential price movements, helping traders make informed decisions.
Here’s a list of some of the most important candlestick patterns you should study for better price action analysis:
- Evening Star
- Morning Star
- Bearish Abandoned baby candlestick pattern
- Bullish Abandoned baby candlestick pattern
- Three Inside up/down
- Three outside up/down
- Inside Bar
- Bullish Piercing
- Dark Cloud Cover
- Spinning Top
- Shooting Star and Inverted Hammer
- Hammer & Hanging Man
- Gravestone, Dragonfly and long-legged Doji
- Engulfing Candlestick Pattern
- Marubozu candlestick pattern
By mastering candlestick patterns and their context, you can improve your ability to read price action and make better-informed trading decisions. Before you start trading candlestick patterns with real money, it’s essential to practice and gain experience. A great way to do this is by using a demo account.
Disclaimer: Please note that, in addition to the disclaimer below, this article is not intended as investment or trading advice. Trading in stocks and other securities carries varying levels of risk and may lead to a loss of capital. The majority of investors and traders experience financial losses. Individuals interested in trading or investing should pursue comprehensive education on the subject and seek guidance from qualified professionals.