In technical analysis, SMA, RMA and EMA are three commonly used moving average methods, which are used to smooth price data, identify trend direction and eliminate interference from short-term price fluctuations. Their respective calculation methods and application scenarios are different.

1. SMA (Simple Moving Average)

SMA is the most basic moving average calculation method. It smoothes data by taking the arithmetic mean of data (such as price) within a certain period. Each data point has the same weight, and the latest data is not given a higher weight.

1.1 SMA calculation formula

For example, to calculate a 10-day simple moving average (SMA), take the sum of the closing prices for the last 10 days and divide it by 10.

1.2 Examples

SMA Implementation in TradingView

1.3 Features

  • Smoothness: Each data point is given the same weight, so the smoothing effect is stronger.

  • Latency: Due to the smoothing effect, SMA reacts slowly to price changes and is suitable for identifying long-term trends.

2. RMA (Wilder’s Moving Average)

RMA is a smoothed moving average method proposed by J. Welles Wilder. It is an exponentially weighted moving average, similar to EMA, but with different weighting coefficients. RMA gives higher weight to recent data, but is smoother, so it is more effective for analyzing long-term trends.

2.1 RMA calculation formula

Where n is the cycle length, previous RMA is the RMA value of the previous cycle, and current value is the current data (such as the closing price).

2.2 Examples

RMA Implementation in TradingView

2.3 Features

  • Weighting coefficient: has a strong smoothing effect and is suitable for long-term trend analysis.

  • Application scenarios: Commonly used for smoothing of technical indicators such as RSI and ADX.

3. EMA (Exponential Moving Average)

EMA is a moving average method that gives more weight to recent data points, so EMA is more sensitive to price changes and is suitable for short-term trend analysis. Compared with SMA, EMA reacts faster to the latest price.

3.1 EMA calculation formula

Among them, α (smoothing coefficient) is: $$\alpha = \frac{2}{n + 1}$$, n is the period of the moving average, and previous EMA is the EMA value of the previous period.

3.2 Examples

EMA Implementation in TradingView

3.3 Features

  • Weighting coefficient: Gives higher weight to the latest data, suitable for capturing short-term trends.

  • Application scenarios: Commonly used in short-term trend analysis tools such as MACD.

4. Comparison of SMA, RMA and EMA

5. Application Scenarios

  • SMA is suitable for identifying long-term trends, such as the 200-day moving average, which is often used to confirm major trends.

  • RMA is often used for smoothing indicators, such as RSI and ADX, and is suitable for medium- and long-term trend analysis.

  • EMA is more sensitive to the latest data and is suitable for capturing short-term trends, such as the signal line in MACD.

5.1 Code Examples

Comparison of SMA, RMA and EMA

Write the script in the editor and add it to the chart, and three curves - SMA, RMA and EMA - will be displayed.

VI. Conclusion

  • SMA is the simplest moving average method and is suitable for long-term trends, but it reacts slowly.

  • RMA is a smoothed moving average method, which has a slower smoothing effect and is suitable for long-term trend analysis (such as ADX, RSI).

  • EMA is a moving average that is weighted more towards the most recent data and is suitable for capturing short-term trends (like MACD).

It is difficult to have an intuitive feeling just by looking at the formula, so I wrote a script in Python to generate 2 waveform graphs.

  • The shorter the period, the closer it is to the true curve, and the longer the period, the smoother the curve.

  • When prices fluctuate in waves, such as peaks and troughs, EMA can capture them more quickly.

  • In the same period, the curve of RMA is smoother.


Friends who are interested in quantitative analysis can click to follow us, and we will continue to update in the future💥.