Moving Average
Moving Averages are one of the most popular and easy to use tools available to
the technical analyst. By using an average of prices, moving averages smooth a
data series and make it easier to spot trends. This can be especially helpful in
volatile markets.
A moving average (MA) is an average of data for a
certain number of time periods. It "moves" because for each
calculation, we use the latest x number of time periods' data. There are
two major types of Moving Averages: "Simple" and "Exponential".
Simple Moving Average
A simple moving average (SMA) is formed by
finding the average price of a currency or commodity over a set number of
periods. Most often, the closing price is used to compute the moving average.
For example: a 5-day moving average would be calculated by adding the closing
prices for the last 5 days and dividing the total by 5.
A moving average moves because as the
newest period is added, the oldest period is dropped. If the next closing price
in the average is 15, then this new period would be added and the oldest day,
which is 10, would be dropped. The new 5-day moving average would be calculated
as follows:
Over the last 2 days, the moving average moved
from 12 to 13. As new days are added, the old days will be subtracted and the
moving average will continue to move over time.
moving averages are lagging indicators and will
always be behind the price. Because moving averages are lagging indicators, they
fit in the category of trend following. When prices are trending, moving
averages work well. However, when prices are not trending, moving averages do
not work
Exponential Moving Average
In order to reduce the lag in simple moving
averages, technicians sometimes use exponential moving averages, or
exponentially weighted moving averages. Exponential moving averages reduce the
lag by applying more weight to recent prices relative to older prices. The
weighting applied to the most recent price depends on the length of the moving
average. The shorter the exponential moving average is, the more weight that
will be applied to the most recent price. For example: a 10-period exponential
moving average weighs the most recent price 18.18% and a 20-period exponential
moving average weighs the most recent price 9.52%. The method for calculating
the exponential moving average is fairly complicated. The important thing to
remember is that the exponential moving average puts more weight on recent
prices. As such, it will react quicker to recent price changes than a simple
moving average. For those who wish to see an example formula for an exponential
moving average, one is provided below. Others may prefer to skip this section
and move on the comparison of the moving averages.
Exponential Moving Average Calculation
The formula for an exponential moving average is:
X = (K x (C - P)) + P
X = Current EMA
C = Current Price
P = Previous period's EMA*
K = Smoothing constant
(*A SMA is used for first period's calculation)
The smoothing constant applies the appropriate
weighting to the most recent price relative to the previous exponential moving
average. The formula for the smoothing constant is:
K = 2/(1+N)
N = Number of periods for EMA
For a 10-period EMA, the smoothing constant would
be .1818.
The EMA formula works by weighting the difference
between the current period's price and the previous period's EMA and adding the
result to the previous period's EMA. There are two possible outcomes: the
weighted difference is either positive or negative.
- If the current price (C) is higher than the
previous period's EMA (P), the difference will be positive (C - P). The
positive difference is weighted by multiplying it by the constant ((C - P) x
K) and the answer is added to the previous period's EMA, resulting in a new
EMA that is higher ((C - P) x K) + P.
- If the current price is lower than the
previous period's EMA, the difference will be negative (C - P). The negative
difference is weighted by multiplying it by the constant ((C - P) x K) and
the final result is added to the previous period's EMA, resulting in a new
EMA that is lower ((C - P) x K) + P.
Moving Average Convergence/Divergence (MACD)
Developed by Gerald Appel, Moving Average
Convergence Divergence (MACD) is one of the simplest and most reliable
indicators available.š The Moving Average Convergence/Divergence (MACD)
indicator is calculated by subtracting the 12-period exponential moving average
of a given currency or commodity from its 26-period exponential moving average.
A 9-period exponential moving average of the MACD itself is usually plotted over
this line as a signal or trigger line. By using moving averages, MACD has trend
following characteristics. In addition, by plotting the difference of the moving
averages as an oscillator, MACD also has momentum characteristics.
There are three techniques commonly used to interpret
the MACD:
Divergence: When MACD moves counter to the direction of the
currency itself, it is a warning that the currency's trend may
change.
Centerline Crossover: Some analysts choose to buy or sell when
the MACD goes above or below zero (the centerline).
Trigger line: When
the MACD crosses above the slower trigger line, this is a bullish signal. When
the MACD goes below the trigger line, it's a bearish signal.
EMA1t = EMA1t-1 + SF1(Pt - EMA1t-1)
EMA2t = EMA2t-1 + SF2(Pt - EMA2t-1)
MACD = EMA1 - EMA2t-1
SL = MACDt-1 + SLSF(MACDt - MACDt-1)
where :
EMA1t = current value of 1st exponential moving average
EMA2t = current value of 2nd exponential moving average
EMA1t-1 = previous value of 1st exponential moving
average
EMA2t-1 = previous value of 2nd exponential moving
average
SF1 = smoothing factor for EMA1
SF2 = smoothing factor for EMA2
MACDt = current MACD value
MACDt-1 = pervious MACD value
SF = signal line
SLSF = singnal line smoothing factor
The Relative Strength Index (RSI) is a bounded
momentum oscillator that compares the magnitude of a currency's recent gains
with the magnitude of its recent losses. The RSI ranges between 0 and 100 with
70 and 30 commonly used as overbought/oversold levels. It takes a single
parameter, the number of time periods that should be used in the calculation; 14
is commonly used. The RSI was created by J. Welles Wilder.
The RSI's full name is actually rather unfortunate as
it is easily confused with other forms of Relative Strength analysis such as
John Murphy's "Relative Strength" charts and IBD's "Relative Strength" rankings.
Most other kinds of "Relative Strength" stuff involve using more than one stock
in the calculation. Like most true indicators, the RSI only needs one stock to
be computed. In order to avoid confusion, many people avoid using the RSI's full
name and just call it "the RSI." Formula:
To simplify the formula, the RSI has been broken down
into its basic components which are the Average Gain, the Average
Loss, the First RS, and the subsequent Smoothed
RS's.
For a 14-period RSI, the Average Gain equals the sum
total all gains divided by 14. Even if there are only 5 gains (losses), the
total of those 5 gains (losses) is divided by the total number of RSI periods in
the calculation (14 in this case). The Average Loss is computed in a similar
manner.
Note: It is important to remember that the Average
Gain and Average Loss are not true averages! Instead of dividing by the
number of gaining (losing) periods, total gains (losses) are always divided by
the specified number of time periods - 14 in this case.
When the Average Gain is greater than the Average
Loss, the RSI rises because RS will be greater than 1. Conversely, when the
average loss is greater than the average gain, the RSI declines because RS will
be less than 1. The last part of the formula ensures that the indicator
oscillates between 0 and 100.
Important Note:
The more data points that are used to calculate the RSI, the more accurate the
results. The smoothing factor is a continuous calculation that - in theory -
takes into account all of the closing values in the dataset. If you start
an RSI calculation in the middle of an existing dataset, your values will only
approximate the true RSI value.
Stochastic Oscillator
Developed by George Lane, the Stochastic Oscillator
is a momentum indicator that measures the price of a currency or commodity
relative to the high/low range over a set period of time. The indicator
oscillates between 0 and 100, with readings below 20 considered oversold and
readings above 80 considered overbought. A 14-period Stochastic Oscillator
reading of 30 would indicate that the current price was 30% above the lowest low
of the last 14 days and 70% below the highest high. The Stochastic Oscillator
can be used like any other oscillator by looking for overbought/oversold
readings, positive/negative divergences and centerline crossovers.

A 14-day %K (14-period Stochastic Oscillator) would
use the most recent close, the highest high over the last 14 days and the lowest
low over the last 14 days. The number of periods will vary according to the
sensitivity and the type of signals desired. As with RSI, 14 is a popular number
of periods for calculation.
|