How to trade with moving averages: Basics & formula explained
For decades, moving averages have been used to identify market trends and make informed entry and exit decisions. Before implementing them into your trading strategy, however, it’s important to know exactly how they work.
Moving averages (MAs) have been one of the most widely used trading indicators for decades, with their simplicity being one of the key reasons for their popularity.
In the world of trading, one of the most common challenges is market noise, which can make it difficult to spot the true direction of price movement.
However, by smoothing out price data, traders have not only been able to smooth out this noise but also gain a far clearer picture of the underlying trend and momentum of the market.
Content
- What are moving averages?
- Moving average formula explained
- How moving averages help in trading
- Popular moving average strategies
- Moving average strategy example: Stock trade walkthrough
- Best moving averages for different trading styles
- Tips for using moving averages effectively
- Is a moving average strategy right for you?
- Key takeaways
- Final thoughts on mastering moving averages
What are moving averages?
So, what are they and how do they work? Before we get into the basics, there are many different kinds of moving averages—each of which has its own strength and use cases.

Exness Trade app
Trade with confidence anytime, anywhere.
Simple Moving Average (SMA)
The Simple Moving Average (SMA) is the most basic type of moving average, calculated by taking the arithmetic mean of a set number of past price points. For instance, a 10-day SMA adds up the closing prices of the last 10 days and divides by 10.
Exponential Moving Average (EMA)
The Exponential Moving Average (EMA) gives more weight to recent prices, making it more responsive to the latest market moves. For instance, if a stock suddenly rises after a period of sideways movement, the EMA will adjust more quickly than the SMA, reflecting the new upward momentum.
Other variants (WMA, SMMA)
There are several other moving averages to be aware of, but two of the most noteworthy are the Weighted Moving Average (WMA) and the Smoothed Moving Average (SMMA), with the WMA assigning different weights to each price, while the SMMA averages prices over a longer period.
Moving average formula explained
Just as each moving average is different, its formula is also slightly different, reflecting how it weighs past prices and responds to recent market movements.
Simple Moving Average formula
The moving averages formula for SMA is:
SMA = (A1 + A2 + ... + An) / n
In terms of how this works, as the trader, you would choose the period—for instance, five days—add the closing prices of the last five days, and then divide by the number of periods. This then gives a smoothed value that represents the average price over that time frame.
Exponential Moving Average formula
The moving averages formula for EMA is:
EMA_Today = (Value_Today × (1 + Days / Smoothing)) + EMA_Yesterday × (1 − (1 + Days / Smoothing))
Here, the EMA calculates a weighted average that gives more importance to recent prices. As a trader, you choose how many days you want to calculate, determine the smoothing factor—this is usually based on the number of days—and then combine the day’s price with the previous day’s EMA. This then allows the EMA to react more quickly to recent price movements while still taking past data into account.
Which formula should beginners use?
If you're a beginner, the formula you use will depend on your trading goals and the level of responsiveness you want. As mentioned before, the SMA is the simplest MA, but EMA is excellent for responsiveness, which can be useful if you’re short-term trading or simply trying to spot trends early.
How moving averages help in trading
There are other benefits to consider when making this decision. MAs aren’t just tools for calculating averages; they help traders carry out a number of key functions, each of which has its own role in identifying trends and timing entry and exit points effectively.
Identifying trend direction
One of the primary uses of MAs is to identify the direction of a trend. When you’re trading the stock market, it’s not enough to simply know a trend is taking place; you have to determine its strength and decide whether it’s a good opportunity to enter a position. In this case, a rising moving average indicates an uptrend, while a falling moving average signals a downtrend.
Using MAs as dynamic support and resistance
MAs can also act as dynamic support or resistance levels. In an uptrend, for instance, prices often pull back to a moving average before bouncing even higher, making the MA a potential support level. Conversely, in a downtrend, a falling MA might act as resistance, with prices often retreating after touching it.
Spotting crossovers
Spotting crossovers can also be done using the “golden cross”, which occurs when a short-term MA crosses above a long-term MA, typically signalling a bullish trend. On the other hand, a “death cross” can happen when a short-term MA crosses below a long-term MA, suggesting the market has become bearish and that traders may want to consider exiting their long positions.
Popular moving average strategies
Using MAs practically involves a bit of experimentation. Again, it all depends on your risk tolerance and preferred timeframe, but there are a few different strategies you can look into that might suit your trading style.
Single Moving Average strategy
The Single Moving Average strategy is the simplest approach to determine the overall direction of the market. When the price is above the moving average, it indicates an uptrend and potential long positions, but when the price is below, it signals a downtrend and potential short positions.
Moving average crossover strategy
While the above strategy is best for beginners, the moving average crossover strategy is a strong choice for traders looking to capture trend reversals quickly. By using a short-term MA, like the 50-period EMA, and a long-term MA, like the 200-period EMA, crossovers can provide clear entry and exit signals, with a golden cross signaling a potential bullish trend and a death cross indicating a potential bearish trend.
Combining MAs with RSI or MACD
Avoid using MAs in isolation. All data points and indicators need others to make sense of them. No matter what strategy you’re going for, combining your moving averages with indicators like RSI or MACD can help to confirm signals and reduce false entries, ensuring that each indication is backed by another.
Strategy | How it works | Best use scenario |
Single Moving Average | Uses one MA (50-period SMA or 20-period EMA) to identify trend direction. | Beginners, trend-following in stable markets. |
Moving average crossover | Uses a fast MA (short-term) and a slow MA (long-term). A bullish signal occurs when the fast MA crosses above the slow MA, and a bearish one occurs when it crosses below. | Trend reversal detection, capturing new trends quickly for medium to long-term trading. |
MAs with RSI or MACD | Uses MA signals in conjunction with momentum indicators. For instance, a bullish crossover is confirmed by an RSI above 50 or the MACD trending upward. | Reducing false signals and improving trade confirmation in volatile markets. |
Moving average strategy example: Stock trade walkthrough
With this in mind, let’s walk through a practical example of a stock trade using a moving average crossover. In this case, we’ll use a 4-hour MSFT stock, looking for a moving average crossover to identify our entry and exit points.
Step 1: Spot the 50/200 crossover
First, look for a golden cross, where the 50-period MA crosses above the 200-period MA.
Step 2: Confirm the trend with the price holding above MA
Next, ensure that the price continues to stay above the 50-period MA, confirming that the trend is sustaining.
Step 3: Exit when the price closes below MA
Lastly, plan your exit when the price closes below the 50-period MA, as this signals a potential weakening of the trend.
Best moving averages for different trading styles
The image above is a simple example of SMMA, but as we mentioned before, different trading styles will require different moving averages.
Day trading with short-term EMAs
If you’re a day trader, for instance, you’ll need quick signals, like the 9-period or 21-period EMA. This will help you react quickly to intraday price movements, allowing you to identify potential entry or exit points quickly.
Swing trading with medium-term MAs
If you’re a swing trader, however, you might use medium-term moving averages, such as the 50-period SMMA or EMA, confirming trends over several days to weeks.
Long-term investing with 200 SMA
On the other hand, long-term investors might prefer the 200-period SMA, which is a widely used benchmark for big-picture market positioning, helping to identify major trends and serve as a guide for holding or adjusting positions over months or years.
Tips for using moving averages effectively
Before you decide on any MA or strategy, however, it’s important to bear in mind a few things:
- Choose MA periods that fit your timeframe: Remember, choose MA periods that fit your timeframe, as failing to do so could easily lead to misleading signals and poor trade timing.
- Avoid whipsaws in ranging markets: Avoid whipsaws in ranging markets, which are false signals caused by the price moving back and forth around the moving average.
- Combine MAs with price action for confirmation: Always combine MAs with price action for confirmation first, before you make any trading decisions.
- Backtest settings before going live: Lastly, be sure to backtest your settings in a demo account before going live, as this will give you the best chance of finding the most effective MA periods and strategy for your market.
Is a moving average strategy right for you?
So, is a moving average strategy right for you? If you’re a beginner, then definitely yes. Moving average strategies are best suited for newcomers in the stock market, mainly due to their simplicity and ease of understanding—not to mention, they’re versatile and work across multiple markets, including forex, stocks, and cryptocurrencies.
They can be less effective in choppy or sideways markets, so if you’re planning on trading frequently in such conditions, make sure you use those other indicators to avoid losses.

Make smarter trading decisions
Use expert analysis and tools on demo accounts or a live account.
Key takeaways
- Moving averages help traders smooth out price data and reveal market trends. By averaging closing prices over a specific time period, moving averages reduce short-term fluctuations and highlight the underlying trend in stock prices.
- The Simple Moving Average (SMA) gives equal weight to all data points. Calculated using the arithmetic mean of past closing prices, the SMA offers a constantly updated average price that helps traders identify upward or downward trends in financial markets.
- The Exponential Moving Average (EMA) gives more weight to recent data. Unlike the SMA, the Exponential Moving Average formula emphasizes recent price moves, making it more responsive to new data and helping technical traders capture early momentum shifts.
- Different moving averages serve different trading purposes. From the weighted moving average (WMA) to the smoothed moving average (SMMA), each variation applies different weights to data points, helping traders fine-tune their analysis based on volatility and timeframe.
- Moving averages act as dynamic support and resistance levels. When plotted on price charts, MAs can show where prices may bounce (support) or pull back (resistance), giving traders visual cues for entry and exit points based on price action.
- Crossovers between moving averages provide powerful trading signals. A bullish crossover (golden cross) happens when a short-term MA crosses above a long-term MA, while a bearish crossover (death cross) occurs when it crosses below—both key signals for trend direction changes.
- The moving averages formula is essential for technical analysis accuracy. Whether using the SMA or the exponential moving average EMA, understanding how the average calculation works helps traders make more informed decisions and avoid misleading signals.
- Traders should choose time periods that match their trading style. Short-term traders often prefer 9- or 21-period EMAs for quick reactions, while long-term traders rely on the 200-period SMA to identify the broader market trend and reduce noise.
- Moving averages are lagging indicators but still vital for trend confirmation. Because they’re based on past price data, moving averages don’t predict moves but confirm them—helping traders spot sustained momentum and filter out random short-term fluctuations.
- Combining moving averages with other indicators improves accuracy. Pairing MAs with tools like RSI or MACD adds confirmation, ensuring signals are supported by momentum data and strengthening overall technical analysis.
Final thoughts on mastering moving averages
Whether you’re a beginner or an experienced trader, moving averages can be beneficial. However, test them out and practice in a risk-free demo account before risking funds. Start with one MA, explore crossovers, and eventually, you’ll see for yourself how they can smooth noise, reveal trends, and provide your entry and exit cues.