Simple Moving Average
The Simple Moving Average, or SMA, is an the average price of the previous
period. For example, if the period is 10 days, the SMA is the average
closing price of the previous 10 days. Stock Chart Wizard allows you to
set any period. You may display up to two SMA lines on the chart.
If you
plot the SMA on a chart the result is a smoothing of the price action of the
stock. It is used to show a trend line for the stock.

Above shows an Simple Moving Average (SMA) line with a period of 50 days for QQQQ (Nasdaq 100
tracking stock). The 50 day SMA line is frequently used indicator for the
trend of a stock. Using this indicator alone for a trending stock such as
this, you might have made the following trades, assuming you got the open price
on the day following when the closing price crossed the 50 day SMA:
5/26/04: Buy at $35.52
7/07/04: Sell at $35.62, profit $0.10/share
8/19/04: Buy at $33.41
1/04/05: Sell at $39.67, profit $6.26/share.
3/08/05: Buy at $37.97
3/09/05: Sell at $37.67, loss of $0.30/share
Shorting the stock at each turn would have also produced additional profits.
Notice this strategy would only work on a nicely trending stock, and is not
likely to be the only indicator a trader would use to make buy/sell/short
decisions, but is just presented here as an example. Notice in the last
trade, you were whipsawed in one day, out the next with a loss of $.30 per
share.
Notice the same chart with the SMA adjusted to 20 days:

Notice adjusting the period to a smaller number of days causes the SMA to
track more closely to the overall trend of the stock. Even with a
well-trending stock, using a 20 SMA would have changed the trades significantly,
with more whipsaw effect, particularly in the February-March time frame.
On the other had, the 20 day SMA alerted us sooner on major reversals, such as
8/18/04 and 1/04/05. Consequently, some traders like to use two moving
averages.
Crossover Technique

With Stock Chart Wizard, you can display two SMA lines. Above, the blue
line is a 10 day SMA, and the dark red is a 50 day SMA. Notice in this
chart that the lines cross over each other five times. Some traders
use the crossover technique to produce buy or sell signals, as it has the effect
of reducing whipsaws. A buy signal is produced when the 50 day SMA crosses
above the 10 day SMA. A sell occurs with the 50 day SMA drops below the 20
day SMA. Our trades would look like this:
6/03/04: Buy at $35.96
7/15/04: Sell at $34.99, loss of $0.97/share.
9/13/04: Buy at $34.91
1/13/05: Sell at $38.58, profit of $3.67
Using this method, in this example we ended with one less trade but our
profit performance was also less.

Above is a chart of Dick's Sporting Goods over the same time period, using
the 10 day and 50 day SMA lines. There are so many crossover points that
your trading performance would be poor. Your best performance would have
been to buy anytime in the first half of 2004 and held onto it.
Unfortunately, we don't have a crystal ball and not may would have held through
the dip in August. Certainly, there are other factors in play that we need
to examine than just the SMA.
Exponential Moving Average
The SMA has some problems. It only factors in the price action of the
previous SMA period (e.g., 10 days, 50 days, or whatever the period is set to).
Another problem is that the price of each day has equal weighting in the
calculation. That is, the most recent price has the same effect on the
average as the oldest price. In other words, in a 10 day SMA, each day has
10% weighting on the average regardless of whether it is the most recent or
least recent price. Also, the SMA reacts when a price is added to the
average, and again when it is dropped off.
The EMA addresses these problems by assigning a greater weight to the most
recent price, with reducing weights given to older prices. It is an
accumulative average, factoring in all the historical data.
The EMA calculation looks like this:
EMAn= Pn * K + EMAn-1 * (1-K)
where
Pn= Closing Price of day "n"
EMAn-1= The EMA calculated for prior day (i.e., n-1)
K= 2/(period +1)
Theoretically, all the stock's known closing price data would be used in the
calculation, starting with the closing price of the first day of trading.
However, since the older closing prices are less weighted than the most recent,
using a smaller set of closing price data will not significantly alter the
results. Stock Chart Wizard downloads up to two years of data for each
stock you are tracking.

This is QQQQ again with two EMA lines: the green is a 14 day EMA and the dark
red is a 50 day EMA.