If you believe in the "trend-in-your-friend" tenet of technical analysis, moving averages are very helpful. Moving averages tell the average price in a given point of time over a defined period of time. They are called moving because they reflect the latest average, while adhering to the same time measure.
A weakness of moving averages is that they lag the market, so they do not necessarily signal a change in trends. To address this issue, using a shorter period, such as 5 or 10 day moving average, would be more reflective of the recent price action than the 40 or 200-day moving averages.
Alternatively, moving averages may be used by combining two averages of distinct time- frames. Whether using 5 and 20-day MA, or 40 and 200-day MA, buy signals are usually detected when the shorter-term average crosses above the longer-term average. Conversely, sell signals are suggested when the shorter average falls below the longer one.
There are three kind of mathematically distinct moving averages: Simple MA; Linearly Weighted MA; and Exponentially Smoothed. The latter choice is the preferred one because it assigns greater weight for the most recent data, and considers data in the entire life of the instrument.