# Moving Average (MA) indicator [Trend Indicator]

**Moving Average (MA)** - Exchange indicator, reflecting the average value of the price indicator of the selected asset for a certain time period. In the calculation *Moving Average indicator* The mathematical averaging of the asset price for the selected period, which is usually indicated in brackets after the indicator name, is used. The resulting average value is in direct correlation with the price movement.

Standard terminal indicator MetaTrader 4.

**Exchange traders in practice use several types of indicators Moving Average:
**- Simple (arithmetic) moving average - Simple Moving Average,

- Exponential Moving Average - Exponential Moving Average,

- Smoothed Moving Average - Smoothed Moving Average,

- Linear Weighted Moving Average.

Value *indicator* *Moving Average* can be calculated for any sequential set of data, for example: opening and closing prices, maximum and minimum prices, trading volume, values of other indicators. Sometimes the MA indicator is used to calculate the moving averages themselves.

The main difference between the different types of *indicator* *Moving Average*: weighting coefficients that are assigned to the latest data. With a Simple Moving Average, prices over the period are weighted equally. Exponential and Weighted Moving Averages focus on recent prices.

### Moving Average indicator signals

Most often when using * indicator Moving average* its dynamics are compared with the dynamics of the price chart. **Signal to buy** occurs when the price chart is above the MA indicator, but if the price is below the moving average, we get **sell signal**. Such a trading system cannot be used in the market as the main one, because it has a noticeable delay from the beginning of the trend movement, however *Moving average* is often used as a filtering indicator for determining the market trend.

By analogy with the price chart *Moving Average* can also be applied to indicators. If the selected indicator (more often it will be an oscillator) rises above its *moving average*, upward trend will continue. If the indicator falls below the MA, the downward movement will continue.

### The formula for calculating the Moving Average indicator:

**Indicator ****Simple ****Moving ****Average** or simple Moving Average is calculated as a simple average of the closing (opening, etc.) price for a selected number of periods.

*SMA = SUM(CLOSE, N)/N,*

Where:

- SUM - amount;

- CLOSE (i) - the closing price of the current period;

- N - number of calculation periods.

**Indicator ****Exponential ****Moving ****Average or Exponential Moving Average** is calculated by adding a certain fraction of the current closing price to the previous value of the MA indicator. In the case of EMAs, the latest closing prices have more weight.

*EMA = (CLOSE(i)*P)+(EMA(i-1)*(100-P)),*

Where:

- CLOSE(i) - the closing price of the current period;

- EMA(i-1) - the MA value of the previous period;

- P - the share of the value of prices.

**Indicator ****Smoothed ****Moving ****Average or Smoothed Moving Average** is calculated in two steps:

The first value of the indicator is calculated by analogy with a simple muving:

*SUM1 = SUM(CLOSE, N),*

*SMMA1 = SUM1/N.*

The values are then calculated using the following formula:

*SMMA(i) = (SUM1-SMMA(1)+CLOSE(i))/N,*

Where:

- SUM - amount;

- SUM(1) - the sum of closing prices (counting from the previous bar);

- SMMA (i - 1) - the SMA of the previous bar;

- SMMA (i) - SMA of the current bar except for the first bar;

- CLOSE (i) - the current closing price;

- N is the smoothing period.

**Indicator ****Linear ****Weighted ****Moving ****Average or Linear Weighted Moving Average** is calculated as follows: the latest data are given a higher weight, the early ones a lower weight. LWMA is calculated as multiplication of each of the closing prices by a certain weight coefficient.

*LWMA = SUM(Close(i)*i, N)/SUM(i, N),*

Where:

- SUM - amount;

- CLOSE(i) - the current closing price;

- SUM (i, N) - the sum of weight coefficients;

- N is the smoothing period.