The Moving Average (MA) is a popular technical indicator used in trading to reflect the average price of an asset over a specific time period. The calculation of the Moving Average involves mathematically averaging the price of an asset over the selected period, which is typically indicated in parentheses after the indicator’s name. This average value directly depends on the movement of the price.
The standard indicator in the MetaTrader 4 platform.
Traders commonly use several types of the Moving Average indicator:
- Simple Moving Average (SMA)
- Exponential Moving Average (EMA)
- Smoothed Moving Average (SMMA)
- Linear Weighted Moving Average (LWMA)
The value of the Moving Average indicator can be calculated for any sequence of data, such as opening and closing prices, high and low prices, trading volume, or other indicators. Sometimes, the MA indicator is used to calculate moving averages themselves.
" />Key Differences Between Moving Average Types
The main difference between various types of the Moving Average lies in the weight assigned to the latest data. In the case of the Simple Moving Average, all prices within the period have equal weight. Exponential and Weighted Moving Averages place more emphasis on recent prices.
Moving Average Signals
When using the forex indicator Moving Average, traders often compare its movement with the price chart. A buy signal occurs when the price chart is above the MA value, while a sell signal is generated when the price crosses below the moving average. This trading system cannot be used as the primary strategy due to its inherent lag, but the Moving Average is often used as a filtering tool to identify market trends.
Similar to the price chart, the Moving Average can also be applied to other indicators. If the chosen indicator (often an oscillator) rises above its Moving Average, an upward trend will continue. If the indicator falls below the MA, the downward movement will persist.
Formula for Calculating the Moving Average:
Simple Moving Average (SMA) is calculated as the average of the closing price (or other values) over a specified number of periods.
SMA = SUM(CLOSE, N)/N,
Where:
- SUM — sum;
- CLOSE(i) — closing price of the current period;
- N — number of periods for calculation.
Exponential Moving Average (EMA) is calculated by adding a portion of the current closing price to the previous MA value. In EMA, the most recent closing prices have greater weight.
EMA = (CLOSE(i)*P)+(EMA(i-1)*(100-P)),
Where:
- CLOSE(i) — closing price of the current period;
- EMA(i-1) — value of the previous period’s MA;
- P — portion of the price value.
Smoothed Moving Average (SMMA) is calculated in two steps:
The first value is calculated similarly to the simple moving average:
SUM1 = SUM(CLOSE, N),
SMMA1 = SUM1/N.
Subsequent values are calculated using the following formula:
SMMA(i) = (SUM1-SMMA(1)+CLOSE(i))/N,
Where:
- SUM — sum;
- SUM(1) — sum of closing prices (from the previous bar);
- SMMA(i-1) — SMA of the previous bar;
- SMMA(i) — SMA of the current bar (excluding the first one);
- CLOSE(i) — current closing price;
- N — smoothing period.
Linear Weighted Moving Average (LWMA) is calculated by assigning greater weight to the most recent data and less weight to earlier data. LWMA is calculated by multiplying each closing price by a specific weighting factor.
LWMA = SUM(Close(i)*i, N)/SUM(i, N),
Where:
- SUM — sum;
- CLOSE(i) — current closing price;
- SUM(i, N) — sum of weighting factors;
- N — smoothing period.
FAQ
What is the Moving Average (MA) indicator?
The Moving Average (MA) is a technical analysis tool that shows the average price of an asset over a specific time period, helping traders identify trends and potential entry/exit points.
How does the Simple Moving Average (SMA) work?
The Simple Moving Average (SMA) calculates the average of closing prices over a set number of periods, giving equal weight to all data points in the selected timeframe.
What is the difference between EMA and SMA?
The Exponential Moving Average (EMA) gives more weight to recent prices, making it more responsive to new information compared to the Simple Moving Average (SMA), which assigns equal weight to all data points.



