The average price is computed for a specific period of time like 10 minutes, 20 days or any other period chosen by the trader. Moving average is a convenient tool as there are moving average strategies that can be altered according to the time frame, hence can be used by both short term traders and long term investors.
Investors can get the idea of the direction of the price by observing the direction of the moving average. If moving average is inclined up then the price is said to be moving up. On the contrary, price tends to be moving downwards if the moving average is inclined down. Also, if it is moving sideways, the price is in a range.
A moving average may also act as support or resistance. In an uptrend, a 50-day, 100-day or 200-day moving average may act as a support level as the average acts as a floor (support), so the price rises to it. Likewise, in a downtrend, a moving average act as resistance; like a ceiling, as the price hits the level and then starts to fall again.
There are many ways to compute moving average. One is five-day simple moving average (SMA) wherein recent five daily closing prices are added and divided by five which given an average of five days. This way, an average is calculated each day. Another type is the exponential moving average (EMA). The EMA is based on considering the recent prices, unlike SMA. EMA is computed by fir calculating The SMA, then multiplier for weighting EMA is calculated. Afterward, current EMA is calculated. As EMA gives more preference to recent prices, if a 50 day SMA and 50-day EMA is compared hen it may be noticed that EMA reacts more rapidly to the prices than SMA does. There is no requirement for manual calculations in computing moving average as all the calculations are done in charting software or trading platforms.
The common lengths in moving average are 10, 20, 50, 100 and 200. These lengths can be applied to any chart time frame such as one minute, daily, weekly, and more. The 20-day moving average tends to be beneficial for a short term trader as it produces less lag (lag is the time taken by moving average to signal a reversal) than long length moving average by following the price more closely. When the price falls below the moving average, it provides a signal for reversal based on the moving average. Therefore, a 20-day moving average provides more signals for reversals than 100-day MA. Likewise, a 100-day moving average is favorable to a long term trader.
The length or time frame chosen by the trader determines the effectivity of the trade and hence must be selected wisely. An MA with a short time frame is supposed to react much quicker to price changes or movements than an MA with a long look length. As shown in the figure below, the 20-day moving average more closely tracks the actual price than the 100-day moving average does.