3
O f all the price-based tech- nical indicators, few are as popular as simple moving averages. A simple mov- ing average (SMA) is the average of a specific price point, usually the close, over a prescribed time period. The primary function of moving aver- ages is to “smooth” prices, thus identify- ing the underlying trend. Countless sys- tems have been built using moving aver- ages and many billions of dollars traded based on their signals. As a tool, they are robust, simple to construct and easy to understand. As with all technical indicators, SMAs have their limitations. Since they smooth past data, they lag the actual price move- ment (i.e., any decline in the price of a stock will not be detected by the SMA until several time periods later). Many attempts have been made to make moving averages more sensitive to recent data. The weighted moving average (WMA), for example, gives greater weight to recent data. Similarly, the exponential moving average (XMA) also gives the greatest weight to the most recent data, but unlike the WMA, the XMA takes all available data into account. In these instances, fixed weights are assigned to the data in calcu- lating the moving average. The variable-index dynamic moving average (VIDYA), originally developed in 1992, uses market information — such as volatility — to make the weighting scheme used to compute the moving average more responsive to market action. Since its inception, it has been added to many commercial software packages and inspired many other traders to build their own dynamic mov- ing averages. One of the features of VIDYA that makes it particularly attractive is that it flattens when the market consolidates. (To learn more about this indicator see The New Technical Trader, Chande and Kroll, John Wiley & Sons, 1994, and Beyond Technical Analysis, second edition, John Wiley & Sons, 2001.) However, a new variable moving aver- age — one that is, like VIDYA, responsive 62 www.activetradermag.com June 2001 • ACTIVE TRADER MEASURING trend momentum trend momentum Most technical analysis indicators monitor either price direction or price momentum. Here’s an indicator that does both, changing its behavior with the dynamics of the market. BY TUSHAR CHANDE ADVANCED Strategies

Measuring Trend Momentum

  • Upload
    pderby1

  • View
    18

  • Download
    3

Embed Size (px)

DESCRIPTION

hh

Citation preview

Page 1: Measuring Trend Momentum

O f all the price-based tech-nical indicators, few are aspopular as simple movingaverages. A simple mov-

ing average (SMA) is the average of aspecific price point, usually the close,over a prescribed time period.

The primary function of moving aver-ages is to “smooth” prices, thus identify-ing the underlying trend. Countless sys-tems have been built using moving aver-ages and many billions of dollars tradedbased on their signals. As a tool, they arerobust, simple to construct and easy tounderstand.

As with all technical indicators, SMAshave their limitations. Since they smoothpast data, they lag the actual price move-ment (i.e., any decline in the price of astock will not be detected by the SMAuntil several time periods later). Manyattempts have been made to make movingaverages more sensitive to recent data.

The weighted moving average (WMA),for example, gives greater weight to re c e n tdata. Similarly, the exponential movingaverage (XMA) also gives the gre a t e s tweight to the most recent data, but unlikethe WMA, the XMA takes all availabledata into account. In these instances, fixedweights are assigned to the data in calcu-lating the moving average.

The variable-index dynamic movingaverage (VIDYA), originally developedin 1992, uses market information — suchas volatility — to make the weightingscheme used to compute the moving

average more responsive to marketaction. Since its inception, it has beenadded to many commercial softwarepackages and inspired many othertraders to build their own dynamic mov-ing averages.

One of the features of VIDYA thatmakes it particularly attractive is that itflattens when the market consolidates.(To learn more about this indicator seeThe New Technical Trader, Chande andK roll, John Wiley & Sons, 1994, andBeyond Technical Analysis, second edition,John Wiley & Sons, 2001.)

H o w e v e r, a new variable moving aver-age — one that is, like VIDYA, re s p o n s i v e

62 www.activetradermag.com • June 2001 • ACTIVE TRADER

M E A S U R I N G trend momentumtrend momentumMost technical analysis

indicators monitor either

price direction or price

m o m e n t u m .

H e r e ’s an indicator that

does both, changing

its behavior with the

dynamics of the market.

BY TUSHAR CHANDE

ADVANCED Strategies

Page 2: Measuring Trend Momentum

to market consolidations but is mored i rectly tied to the trend — can be con-s t ructed. It is formed by combining theideas behind the following three commonindicators: the average directional index(ADX), the stochastic oscillator and expo-nential moving averages (XMA). Theresulting indicator is called the ChandeD i rectional Moving Average (CDMA).

A complete discussion of the ADX, sto-chastic oscillator and XMAis beyond thescope of this article, but a brief summarywill provide the necessary backgroundfor our new indicator.

The ADX has a rather complex calcu-lation; it can be approximated by takingthe simple moving average of a simplemoving average of closing prices (dou-ble smoothing). While the A D Xresponds unevenly to price action, it isgenerally considered an excellent indica-tor of trend strength.

The stochastic oscilla-tor is comprised of twolines: %K and %D, thelatter of which is a mov-ing average of %K. Tocalculate %K, subtractthe lowest price of themost recent n bars fromthe most recent close,and divide that total bythe range (high-low) ofthe most recent n bars.Stochastics range from 0to 100. A reading over 80is considered overboughtand a reading below 20 isconsidered oversold.

An exponential mov-ing average is construct-ed by adding a fixed per-centage, x, of the latestclosing price to (1-x) ofthe previous value of themoving average. Forexample, an XMA couldadd 20 percent of the lat-est close to 80 percent ofyesterday’s XMA to findtoday’s XMA. An XMAisdesigned to give recentprices greater weight.

The plan behind the new CDMA is toapply the stochastic oscillator to the val-ues of the ADX. When the ADX is rising,there will be a trend, and a stochasticapplied to the ADX will be near the topof its range. Conversely, when the ADXis falling, which implies a lack of trend, astochastic of the ADX will be near thebottom of its range. The stochastic read-ing (translated into a value between 0 to1, instead of 0 and 100) will then be usedto weigh the XMAfor the current bar.

If the stochastic oscillator applied tothe ADX indicator is 0, the assumption isthat there is no trend and the new valueof the XMAwill be equal to the old valueof the XMA. Hence, the CDMAwill flat-ten out. When the CDMA confirms theX M A action, the trend has stro n gmomentum; when they diverge, cautionmay be warranted.

Figure 1 (below) shows the CDMA

(solid line) and the equivalent 20-dayXMA (small crosses) on a continuouschart of the Nasdaq 100 futures. Thelower half of Figure 1 shows a plot of the20-day ADX. The market is tre n d i n gwhen the ADX is above the referencelevel of 20 and rising. The values chosenfor the length of the ADX and the refer-ence level are arbitrary.

In October 1999, the ADX was at a lowlevel, indicating a lack of trend, and theC D M A and the XMA had separated. A sthe market broke out of a trading range,the ADX quickly rose above 20 and theC D M A and XMA values converged rap-i d l y, confirming the rally. During the con-solidation in January, the ADX declinedbut stayed above 20, showing a weaken-ing trend. Hence, CDMAand XMA s e p a-rated, with the CDMAflattening out.

ACTIVE TRADER • June 2001 • www.activetradermag.com 63

continued on p. 64

Notice how the Chande Directional Moving Average (solid line) has a more stable appearancethan a regular exponential moving average. This characteristic can help you filter out whipsaw trades that are common during market consolidations.

FIGURE 1 CONFIRMING THE TREND

October November December January 2000 February March

4600.0

4400.0

4200.0

4000.0

3800.0

3600.0

3400.0

3200.0

3000.0

2800.0

2600.0

2400.040.0035.0030.0025.0020.0015.00

Nasdaq 100 Index (NDX), daily

Source: TradeStation by TradeStation Group Inc.

ADXW REF 22.35 20.00

Page 3: Measuring Trend Momentum

When the Nasdaq rallyresumed in February, theC D M A followed theXMA reluctantly, as theADX had flattened out,even though it was abovethe 20 level. This is typi-cal of rallies after briefconsolidations withinp rolonged bull tre n d s .The difference in behav-ior between the CDMAand XMA is explained bythe fact that the CDMAresponds to changes inmomentum rather thanprices.

Figure 2 (left) shows acontinuous chart of DowJones futures. Note howthe CDMA (solid line)flattened out during con-solidations, and how theC D M A and the 20-dayX M A ( c rosses) cametogether during declines,confirming the bearishtone of the market.

The CDMA is a valuablevariation on traditionalmoving averages but, likeany other indicator, it haslimitations. For example,price could continue torise or fall slowly after aninitial strong move. Inthis case, the ADX will bedeclining and the CDMAwill flatten out, showinga lack of trend. However,the price action in thisinstance would be worthtrading, as in the mostrecent period in Figure 1.

Even so, you can usethe CDMA to confirmthat market momentumsupports the move indi-cated by the equivalentXMA. You can also use itfor any time frame, rang-ing from intraday tomonthly data, and itgives you the ability tocombine multiple timeframes, as well asmomentum data, into asingle indicator.Ý

64 www.activetradermag.com • June 2001 • ACTIVE TRADER

Programming code {Tushar Chande 2001: VIDYA/CDMA}

Input: Len(10);Vars: Diff(0), MyConst(0), MyAdx(0), Varma(0), EmaIndex(0);

{… Index of EMA …}If Len > 0 then EmaIndex = (2 / (1 + Len)) else EmaIndex = 0.20;

{… Stochastic oscillator using ADX …}MyAdx = ADX(20);Diff = Highest(MyAdx, 20) - Lowest(MyAdx, 20);If Diff > 0 then MyConst = (MyAdx - Lowest(MyAdx, 20))/Diff else MyConst = EmaIndex;

{… Clamp length to that implied by input value of Len …}If MyConst > EmaIndex then MyConst = EmaIndex;

{… Create the variable MA …}If CurrentBar < 50 then Varma = Close else Varma = (1 - MyConst) * Varma[1] + MyConst * Close;

Plot1(Varma, “VarMA”) ;Plot2(XAverage(Close, Len), ”XAvg”)

This code can be copied from www.activetradermag.com/code.htm.

During May and June 1999, the CDMA stayed flat, indicating the market was in a consolidationand that the crossover signals between price and the XMA should be ignored. However, whenthe market broke down in September, both MAs were moving in tandem, signaling a validtrading opportunity.

FIGURE 2 WORKING IN TANDEM

May June July Aug. Sept. Oct. Nov. Dec. 2000 Feb. Mar.

40.00

30.00

20.00

Dow Jones Industrial Average Index (DJIA), daily

Source: TradeStation by TradeStation Group Inc.

11800

11600

11400

11200

11000

10800

10600

10400

10200

10000

9800ADXW REF 33.40 20.00