Open your account
Empower yourself with cutting-edge tools, expert insights, and unrivaled features.Moving Averages: Meaning, Calculation and Uses
Summary
Learn how moving averages smooth price data and help identify trends, and explore how ADX, +DI and -DI are used to assess trend strength and direction.
Moving Averages
What Are Moving Averages?
A moving average is an indicator that helps traders identify the primary trend by removing the bulk of the noise seen in price data. It does this by calculating the average of closing prices over a defined period and gets updated as new prices are added and older ones are removed.
For instance, a 5-day moving average is determined by summing the closing prices of the last 5 days and dividing by 5. This provides a single value that represents the average price over a said timeframe, making it easier to observe trends without being distracted by short-term volatility.
Let’s assume the closing prices of Reliance Industries for the past 5 days were as follows:
- Day 1: ₹1200
- Day 2: ₹1210
- Day 3: ₹1225
- Day 4: ₹1230
- Day 5: ₹1215
To calculate the 5-day moving average, we add these prices together and divide by 5:
5-Day Moving Average = (1200 + 1210 + 1225 + 1230 + 1215) / 5 = 6080 / 5 = ₹1216
So, the 5-day moving average is ₹1216. This means that over the last 5 days, the average price of Reliance Industries was ₹1216.
What happens when a new day’s price is added?
Now, let’s say the closing price on the 6th day is ₹1220. To calculate the new 5-day moving average, we drop Day 1’s price (₹1200) and include the new price of Day 6 (₹1220). The new set of prices is:
- Day 2: ₹1210
- Day 3: ₹1225
- Day 4: ₹1230
- Day 5: ₹1215
- Day 6: ₹1220
New 5-Day Moving Average = (1210 + 1225 + 1230 + 1215 + 1220) / 5 = 6100 / 5 = ₹1220
Notice that the 5-day moving average has risen. That’s what happens in an uptrend!
In bullish (bearish) markets, prices will remain above (below) the moving average. The moving average itself will move up (down) in uptrends (downtrends).
Shorter moving averages are more sensitive to price changes, while longer ones are less responsive.
1. +DI (Positive Directional Indicator):
The +DI measures the strength of upward price movement over a given period.
2. -DI (Negative Directional Indicator):
The -DI measures the strength of downward price movement over the same period.
3. ADX (Average Directional Index):
The ADX is a smoothed moving average of the Directional Movement Index (DMI), which is the absolute difference between +DI and -DI divided by their sum.
How is the ADX Calculated?
Directional Movement (DM):
+DM = Current High - Previous High (if positive and greater than Current Low - Previous Low, otherwise 0)
-DM = Previous Low - Current Low (if positive and greater than Current High - Previous High, otherwise 0)
True Range (TR):
TR = Maximum of:
(Current High - Current Low) or Absolute (Current High - Previous Close) or Absolute (Current Low - Previous Close)
+DI and -DI:
*Smoothed values mean simple moving averages (normally 14 day)
+DI = (Smoothed * +DM / Smoothed * TR) × 100
-DI = (Smoothed * -DM / Smoothed * TR) × 100
Directional Movement Index (DMI):
DMI = ABS(+DI - -DI) / (+DI + -DI)
ADX:
ADX = Smoothed Moving Average of DMI over a specified period (commonly 14 days).
Example: Reliance Industries
Step 1: Calculate +DM, -DM, and TR
Assume the following:
Current High = ₹2500, Previous High = ₹2480
Current Low = ₹2450, Previous Low = ₹2460
Previous Close = ₹2470
+DM = ₹2500 - ₹2480 = ₹20 (since it is positive and greater than Current Low - Previous Low)
-DM = ₹2460 - ₹2450 = ₹10 (since it is positive and less than Current High - Previous High)
TR = Maximum of:
₹2500 - ₹2450 = ₹50
|₹2500 - ₹2470| = ₹30
|₹2450 - ₹2470| = ₹20
TR = ₹50
Step 2: Calculate +DI and -DI
Assume Smoothed +DM = ₹15, Smoothed -DM = ₹10, and Smoothed TR = ₹40:
+DI = (₹15 / ₹40) × 100 = 37.5
-DI = (₹10 / ₹40) × 100 = 25
Step 3: Calculate DMI
DMI = |37.5 - 25| / (37.5 + 25) = 12.5 / 62.5 = 0.2
Assume the smoothed moving average of DMI over 14 days is:
ADX = 20
How to Interpret the ADX?
1. Trend Strength:
- ADX below 20: Indicates a weak or non-trending market (ranging or sideways).
- ADX between 20 and 40: Indicates a moderate trend.
- ADX above 40: Indicates a strong trend.
2. Trend Direction:
- +DI > -DI: Indicates an uptrend.
- -DI > +DI: Indicates a downtrend.
3. Crossovers:
- When +DI crosses above -DI, it signals a potential bullish trend.
- When -DI crosses above +DI, it signals a potential bearish trend.
Key Points to Remember:
- The ADX measures trend strength, not direction.
- +DI and -DI indicate the trend direction.
- The ADX is a lagging indicator because it is based on historical price data.
- The ADX works best in trending markets and may give false signals in choppy or sideways markets.
- Combine the ADX with other indicators, candle patterns etc.
- The ADX does not have overbought or oversold levels, unlike the Stochastic Oscillator.