CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 74% of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you can afford to take the high risk of losing your money.

CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 81.76% of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

74% of retail investor accounts lose money when trading CFDs with this provider.
81.76% of retail investor accounts lose money when trading CFDs with this provider.

# Trading View and MetaTrader Moving Average Types

Moving averages (MAs) are widely used in technical analysis to smooth out price data and identify trends over a specified period.

They serve as a valuable tool for traders and investors in interpreting market movements. In this article, we will delve into the different types of moving averages commonly employed, namely Simple MA, Exponential MA, Smoothened MA, and Linear Weighted MA. Each type has its unique characteristics and applications, offering various insights into market behavior.

## Simple Moving Average (SMA)

The Simple Moving Average is the most basic form of MA. It is calculated by summing up a set number of closing prices over a defined period and then dividing the sum by the number of data points. The SMA provides an equal weightage to each price point in the calculation. For example, a 10-day SMA would sum the closing prices of the past 10 days and divide it by 10.

Calculation formula:

SMA = (Sum of closing prices over a specified period) / (Number of data points)

For example, a 10-day SMA would be calculated as:

SMA = (Closing price day 1 + Closing price day 2 + … + Closing price day 10) / 10

## Exponential Moving Average (EMA)

The Exponential Moving Average is more responsive to recent price changes compared to the Simple Moving Average. EMA assigns more weightage to recent prices, making it a popular choice among traders looking for faster trend identification. EMA calculations involve using a smoothing factor (often referred to as alpha), which determines the weight assigned to each price point. The formula for EMA involves calculating the current EMA value by multiplying the previous EMA by the smoothing factor, subtracting it from the current price, and adding the result to the previous EMA.

Calculation formula:

EMA today = (Current price – EMA yesterday) * (Smoothing factor) + EMA yesterday

The initial EMA value can be set as the SMA for the first calculation.

The smoothing factor (often denoted as alpha) determines the weight assigned to each price point. The formula calculates the EMA for each subsequent period.

## Smoothened Moving Average (SMMA)

The Smoothened Moving Average, also known as the Smoothed Moving Average, aims to reduce the impact of short-term fluctuations and provide a clearer representation of the underlying trend. It achieves this by applying additional smoothing techniques to the Simple Moving Average. .

The SMMA assigns more significance to the most recent data points, but it does not respond as quickly as the EMA to immediate price changes

Calculation formula:

SMMA = (Previous SMMA * (N – 1) + Current closing price) / N

Here, N represents the period or number of data points considered. The SMMA applies additional smoothing techniques to the Simple Moving Average by giving more significance to the most recent data points.

## Linear Weighted Moving Average (LWMA)

The Linear Weighted Moving Average emphasizes recent prices even more than the EMA and SMMA.

It assigns higher weightage to the most recent data points and decreases weight linearly as you move backward in time. This type of moving average is particularly useful when there is a need to capture short-term price movements accurately. The formula for calculating the LWMA multiplies each price point by a weight that increases linearly and then divides the sum of the weighted prices by the sum of the weights.

Calculation formula:

LWMA = [(Closing price day 1 * 1) + (Closing price day 2 * 2) + … + (Closing price day N * N)] / [(1 + 2 + … + N)]

The LWMA assigns higher weightage to recent prices, with the weight increasing linearly as you move backward in time.

The numerator calculates the weighted sum of closing prices, while the denominator calculates the sum of the weights.

## Moving Averages’ settings

It’s important to note that changing the settings of moving averages may impact the characteristics of the indicator. Modifying the settings can result in different trading signals, responsiveness to price changes, and noise reduction capabilities. Also, different Platforms might offer different features and options for the settings of the indicator in question, therefore, we have chosen to show the most commonly used ones.

#### Here are some common settings and their potential impact when changed from the default values:

Period Length: The period length refers to the number of data points used in the moving average calculation. By adjusting the period, you can change the timeframe over which the moving average is calculated. A shorter period provides a faster-moving average that is more sensitive to recent price changes, while a longer period results in a slower-moving average that smooths out price fluctuations.

Example: Changing a 50-day SMA to a 20-day SMA would make the moving average more responsive to recent price movements, potentially providing earlier trading signals.

Smoothing Factor/Alpha: The smoothing factor, also known as alpha, is specific to the Exponential Moving Average (EMA) and determines the rate at which recent prices impact the moving average. Higher alpha values assign more weight to recent prices, resulting in a faster-moving average, while lower alpha values give more weight to older prices, resulting in a slower-moving average.

Example: Increasing the alpha value of a 10-day EMA from 0.2 to 0.4 would make the moving average more responsive to recent price changes.

Weightage Scheme: The Linear Weighted Moving Average (LWMA) assigns different weights to each data point based on its position in the period. The default weightage scheme is linear, where each data point has equal weight. However, traders can experiment with customized weightage schemes that assign more weight to recent prices, thereby making the moving average more sensitive to immediate price movements.

Example: Applying an exponential weightage scheme to a 10-day LWMA would place higher weight on the most recent prices, resulting in a faster-moving average.

Shift Setting: The Shift setting allows you to shift the moving average backward or forward in time. It helps align the moving average with the current price action or to anticipate future price movements. Positive values shift the moving average to the right, while negative values shift it to the left.

Example: Setting a shift of +1 would shift the moving average one period to the right, aligning it with the current price action.

“Apply to” settings: These additional “Apply to” options provide alternative ways of calculating moving averages by incorporating different price components. Traders can choose the most suitable option based on their trading strategy and the specific aspects of price action they want to focus on. Below are the settings available in trading platforms like MetaTrader and TradingView:

Close: When the “Apply to” setting is set to “Close,” the moving average is calculated using the closing prices of each period. The closing price is the last traded price at the end of a specific time interval (such as a candlestick or bar). The closing price is often considered a significant data point as it reflects the market sentiment at the end of the period.

Example: A 50-day Simple Moving Average (SMA) calculated based on the closing prices would provide an average of the closing prices over the past 50 days.

Open: Setting the “Apply to” option to “Open” calculates the moving average using the opening prices of each period. The opening price is the first traded price at the beginning of a specific time interval. Traders may choose to use the opening price as the basis for their moving average calculation to capture the initial market sentiment at the start of each period.

Example: A 20-day Exponential Moving Average (EMA) based on the opening prices would provide an average of the opening prices over the past 20 days.

High: When “High” is selected as the “Apply to” option, the moving average is computed using the highest prices reached during each period. The highest price reflects the peak or maximum price traded within the specified time interval. Traders may utilize the high price as the input for the moving average to focus on potential resistance levels or price extremes.

Low: Selecting “Low” as the “Apply to” option calculates the moving average using the lowest prices reached during each period. The lowest price represents the bottom or minimum price traded within the specified time interval. Traders may use the low price as the basis for their moving average to identify potential support levels or price bottoms.

Example: A 30-day Simple Moving Average (SMA) based on the lowest prices would provide an average of the lowest prices over the past 30 days.

Median Price (HL/2): The Median Price option calculates the moving average based on the median value between the high and low prices of each period. It takes the average of the high and low prices and can provide a more balanced representation of price action. Using the median price can help smooth out extreme price fluctuations and provide a clearer picture of the overall market trend.

Example: A 50-day Exponential Moving Average (EMA) based on the median price would provide an average of the median values (average of high and low prices) over the past 50 days.

Typical Price (HLC/3): The Typical Price option calculates the moving average based on the average of the high, low, and closing prices of each period, divided by three. It is a weighted average that considers all three components of price action and provides a comprehensive view of market activity. The typical price is often used to identify general price trends and potential reversal points.

Example: A 20-day Simple Moving Average (SMA) based on the typical price would provide an average of the sum of high, low, and closing prices divided by three over the past 20 days.

Weighted Close (HLCC/4): The Weighted Close option calculates the moving average using a weighted average of the high, low, closing, and current period’s closing prices. Each component is assigned a weightage, typically 1/4, resulting in a more comprehensive moving average that considers multiple price points. The weighted close price helps emphasize the closing price while also incorporating other important price levels.

Example: A 30-day Exponential Moving Average (EMA) based on the weighted close would provide an average of the sum of high, low, closing, and current closing prices divided by four over the past 30 days.

## Moving Averages comparison in detail

Below we have prepared a detailed comparison between the types of moving averages mentioned: Simple Moving Average (SMA), Exponential Moving Average (EMA), Smoothened Moving Average (SMMA), and Linear Weighted Moving Average (LWMA).

## Calculation Method

• SMA: The SMA calculates the average by summing up closing prices over a specified period and dividing the sum by the number of data points.
• EMA: The EMA assigns more weight to recent prices and calculates the current EMA value using a smoothing factor (alpha) and the previous EMA value.
• SMMA: The SMMA applies additional smoothing techniques to the SMA and assigns more significance to the most recent data points.
• LWMA: The LWMA assigns higher weightage to recent prices, with the weight increasing linearly as you move backward in time.

## Sensitivity to Price Changes

• SMA: The SMA provides a simple and steady average, but it may lag behind quick price changes since it assigns equal weight to all data points.
• EMA: The EMA is more responsive to recent price changes due to its focus on assigning more weight to recent data points.
• SMMA: The SMMA reduces the impact of short-term fluctuations, providing a smoother representation of the underlying trend but responding more slowly to immediate price changes compared to EMA.
• LWMA: The LWMA emphasizes recent prices even more than the EMA and SMMA, making it useful for capturing short-term price movements accurately

## Trend Identification

• SMA: The SMA helps identify trends but can be slower in recognizing changes since it considers an equal weight for all data points.
• EMA: The EMA responds quickly to price changes, making it beneficial for trend identification and capturing emerging trends.
• SMMA: The SMMA reduces noise and provides a clearer representation of the underlying trend.
• LWMA: The LWMA is well-suited for short-term trend identification and can help traders capture trends with higher accuracy.

## Weightage Distribution

• SMA: The SMA assigns equal weight to each price point.
• EMA: The EMA assigns exponentially decreasing weight to previous data points, with more weight on recent prices.
• SMMA: The SMMA assigns more significance to the most recent data points and reduces weightage for earlier data points.
• LWMA: The LWMA assigns higher weight to recent prices, with a linearly increasing weight as you move backward in time.

## Usage and Preference

• SMA: The SMA is commonly used as a benchmark for other types of moving averages. It is suitable for long-term trend analysis.
• EMA: The EMA is popular among traders who require faster trend identification and wish to capture recent price changes.
• SMMA: The SMMA is useful for smoothing out price data and reducing noise, offering a clearer view of the overall trend.
• LWMA: The LWMA is favored by traders who want to emphasize recent price movements and capture short-term trends effectively.

#### The choice of moving average depends on the specific requirements of traders.

The SMA provides a simple and steady average, while the EMA, SMMA, and LWMA offer varying degrees of responsiveness to recent price changes and noise reduction.

## Combining different types of moving averages

Here are a few examples of how different moving averages can be used in combination starting with:

### Moving Average Crossover

This strategy involves plotting two different moving averages on a price chart and observing their intersections. The most popular crossover is the SMA crossover, where a shorter-term SMA (e.g., 50-day) and a longer-term SMA (e.g., 200-day) are used. When the shorter-term SMA crosses above the longer-term SMA, it generates a buy signal, indicating a potential uptrend. Conversely, when the shorter-term SMA crosses below the longer-term SMA, it generates a sell signal, indicating a potential downtrend. Traders often use this crossover strategy to identify entry and exit points in the market.

Example: A 50-day SMA crossing above a 200-day SMA may signal a bullish trend, while a 50-day SMA crossing below a 200-day SMA may indicate a bearish trend.

### Multiple Moving Average Convergence Divergence (MACD)

The MACD indicator combines two EMAs and a signal line (another EMA). The MACD line represents the difference between the shorter-term EMA and the longer-term EMA. The signal line, typically a 9-day EMA, is plotted on top of the MACD line to generate trading signals. When the MACD line crosses above the signal line, it indicates a bullish signal, suggesting a potential buying opportunity. Conversely, when the MACD line crosses below the signal line, it generates a bearish signal, indicating a potential selling opportunity.

Example: If the 12-day EMA crosses above the 26-day EMA and the MACD line rises above the signal line, it may suggest a bullish trend.

### Moving Average Envelopes

Moving average envelopes involves plotting multiple MAs around a central MA to create a channel. Traders often use a percentage deviation from the central MA to calculate the upper and lower envelopes. The envelopes can help identify overbought and oversold conditions in the market. When prices approach the upper envelope, it suggests potentially overbought conditions, while prices near the lower envelope may indicate oversold conditions.

Example: Using a 20-day SMA as the central line, one could plot a 5% deviation above and below the SMA to create the upper and lower envelopes. Traders might consider selling when prices reach the upper envelope and buying when prices reach the lower envelope.

### Triple Exponential Moving Average (TEMA)

The TEMA combines three EMAs to reduce lag and provide a smoother trend line. It offers a more responsive moving average by applying multiple exponential smoothing calculations. Traders can use TEMA to identify trend reversals and generate trading signals.

Example: A bullish signal may be generated when the TEMA starts to rise after being in a downtrend, indicating a potential trend reversal

### SMMA and EMA Combination

Combining the Smoothened Moving Average (SMMA) with the Exponential Moving Average (EMA) allows traders to achieve a balance between smoothing out short-term fluctuations and capturing recent price changes. This combination can provide a clearer view of the trend while reducing noise.

Example: A trader may use a 30-day SMMA to smoothen out price data and a 10-day EMA to capture recent price movements. When the 10-day EMA crosses above the 30-day SMMA, it could indicate a bullish signal.

### EMA and LWMA Combination

Combining the Exponential Moving Average (EMA) with the Linear Weighted Moving Average (LWMA) can help traders emphasize recent price movements even more while giving some weight to historical prices.

Example: A trader might use a 20-day EMA for faster trend identification and a 10-day LWMA for increased sensitivity to recent price changes. If the 10-day LWMA crosses above the 20-day EMA, it could suggest a potentially bullish signal.

It’s important to note that combining moving averages should be accompanied by other technical indicators and analysis methods to validate signals and reduce false signals.

Traders may also experiment with different combinations and timeframes to suit their trading style and preferences.

## Adopting Moving Averages for Risk Management

Moving averages can also be used as risk management tools in addition to their role in identifying trends and entry/exit points.

Here are a few examples of how different moving averages can be employed for risk management purposes:

### Stop Loss Placement

• Use a shorter-term moving average, such as a 10-day SMA or EMA, to set a dynamic stop loss level.
• Place the stop loss below the moving average to protect against excessive losses.
• As the price moves in favor of the trade, adjust the stop loss level to trail the moving average, aiming to lock in profits or limit potential losses.

### Volatility-based Stop Loss

• Combine a longer-term moving average, such as a 50-day SMA or EMA, with a measure of price volatility, such as Average True Range (ATR).
• Calculate a percentage of the ATR, e.g., 1.5 times the ATR.
• Use the longer-term moving average minus the percentage of the ATR as a trailing stop loss level.
• Adjust the stop loss periodically based on changes in volatility to limit downside risk.

### Moving Average Envelope for Risk Zones

• Create an envelope around a longer-term moving average, such as a 200-day SMA or EMA.
• Add a percentage value to the moving average to form the upper band and subtract the same percentage to form the lower band.
• The upper band represents a higher-risk zone, while the lower band indicates a lower-risk zone.
• When the price approaches the upper band, it may signal potentially overbought conditions, prompting caution or potential profit-taking.
• When the price nears the lower band, it may suggest oversold conditions, indicating potential buying opportunities.

### Moving Average Divergence for Trend Weakness

• Compare two moving averages of different time periods, such as a 50-day SMA and a 200-day SMA.
• Calculate the difference between the two moving averages.
• Monitor the divergence between the moving averages to identify potential weakening of the trend.
• If the shorter-term moving average crosses below the longer-term moving average or the difference starts to narrow significantly, it may indicate a potential trend reversal or weakening trend, prompting risk management actions such as profit-taking or tightening stop losses.

We have to let you know that our partnership with Capitalize.AI helps our clients to automate such conditions in an extremely easy process, where traders with no coding or programming skills are automating their approach in a couple of hours. The services are free of charge to all Eightcap traders and Backtesting and Simulating are strongly recommended.

Remember that risk management strategies can vary based on individual trading preferences, risk tolerance, and market conditions. Additionally, risk management should encompass a comprehensive approach that includes position sizing, diversification, and other risk mitigation techniques in conjunction with moving averages. Combining moving averages should be used in conjunction with other technical indicators, risk management strategies, and thorough analysis of market conditions.

It is important to thoroughly backtest any risk management techniques and adjust them according to your specific trading approach.

In addition to the above, please note that the examples offered in this article should be used as a rough guide. It’s important to remember that market conditions can change, and price movements can vary significantly within different time and market environments. Traders should refer to real-time data and should regularly assess current market conditions and adapt their strategies accordingly to account.

Consider experimenting with different moving average types and time periods to find the combination that best suits your trading style.

Remember that moving averages are just one tool among many in a trader’s toolbox, and combining them with other technical indicators and fundamental analysis can enhance decision-making in CFD trading.

* The information provided here has been prepared by Eightcap’s team of analysts. All expressions of opinion are subject to change without notice. Any opinions made may be personal to the author and do not reflect the opinions of Eightcap.
In addition to the disclaimer on our website, the material on this page does not contain a record of our trading prices, or represent an offer or solicitation for a transaction in any financial instrument. Eightcap accepts no responsibility for any use that may be made of these comments and for any consequences that result. No representation or warranty is given as to the accuracy or completeness of this information. Consequently, any person acting on it does so entirely at their own risk. Any research provided does not have regard to the specific investment objectives, financial situation and needs of any specific person who may receive it. It has not been prepared in accordance with legal requirements designed to promote the independence of investment research and as such is considered to be a marketing communication.
Please note that past performance is not a guarantee or prediction of future performance. This communication must not be reproduced or further distributed without prior permission.