[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RT] Re: ADX Formula


  • To: Alex Matulich <alex@xxxxxxxxxxxxxx>
  • Subject: [RT] Re: ADX Formula
  • From: profitok <profitok@xxxxxxxxxxxxx>
  • Date: Wed, 2 Apr 2003 11:47:36 -0800
  • In-reply-to: <20030402190849.AB8D02B56F@xxxxxxxxxxxxxxx>

PureBytes Links

Trading Reference Links

> Gabriel Gray asked:
> >Anyone know the exact formula for calculating Wilder's ADX or a web
> >site that contains it. I found one on Linn software's site but the
> >math is incorrect. Everyone seems to talk qualitatively about it
> >without reference to the exact measurements.
> 
> That's because it isn't an exact measurement.  It's doubly-smoothed,
> for one thing, and as such is just an approximate indicator with a
> lot of lag.
> 
> There are many ways to calculate it.  Welles Wilder's own way
> used an exponential average as an approximation for an arithmetic
> average because an exponential average is easier to implement in
> a computationally-efficient way.  At the time he developed it,
> computer time was expensive.
> 
> If you're not viewing this with a fixed width font, then do so.
> 
> Generally speaking:
> 
>       |(average of up movements) - (average of down movements)|
>  DX = ---------------------------------------------------------
>        (average of up movements) + (average of down movements)
> 
> 
>  ADX = DX smoothed.
> 
> Wilder is so enamored by his "discovery" of the concept of True
> Range that he feels compelled to include a silly step where he
> divides each term by average true range (ATR), but this is totally
> unnecessary because all the ATR terms cancel each other out in the
> end.
> 
> Wilder also contrived a tricky way to define an "up movement" and
> "down movement" but in my experiments with my own variants of ADX, I
> have found that it doesn't matter what you use.  You can even define
> up movement as 0 or 1 and down movement as 0 or -1 depending on
> whether the market closed higher or lower than the previous close.
> 
> But since you asked, here are Wilder's steps.  Just be aware that
> they are not Gospel.  You may come up with a better way to calculate
> ADX than Wilder.
> 
> 
>  Step 1: Calculation of Direction Movements
> 
>    PDM = H - Hp    (Plus Direction Movement)
>    MDM = L - Lp    (Minus Direction Movement)
> 
>    where:
>     H, Hp = current high, previous high
>     L, Lp = current low, previous low
> 
>    if |PDM| < |MDM| then PDM = 0
>    if |PDM| > |MDM| then MDM = 0
>    if |PDM| = |MDM| then
>       if PDM>0 then MDM=0 else if MDM<0 then PDM=0
>    if PDM < 0 and MDM > 0 then PDM = 0 and MDM = 0
> 
>    As I said, it doesn't matter how you calculate PDM and MDM.
>    PDM = max(0, C - Cp) and MDM = |min(0, C - Cp)|
>    will work just as well.
> 
> 
>  Step 2: Calculation of True Range
>   THIS STEP IS UNNECESSARY FOR THE FINAL RESULT AND MAY BE SKIPPED.
> 
>   True Range(TR) is the largest value of the following:
> 
>   TR = max(H-L, Cp-L, H-Cp)
> 
>   where Cp = the close for the previous period (i.e. yesterday)
> 
> 
>  Step 3: The Positive & Minus Directional Indicators (PDI & MDI)
>   THIS STEP IS UNNECESSARY FOR THE FINAL RESULT AND MAY BE SKIPPED.
> 
>   The smoothed Positive and Minus Directional Movement values are
>   divided by the smoothed True Range to get the Positive and Minus
>   Directional Indicators.
> 
>         EMA(|PDM|, n)               EMA(|MDM|, n)
>   PDI = -------------   and   MDI = -------------
>          EMA(TR, n)                  EMA(TR, n)
> 
>   where:
>    EMA  is an exponential moving average of the specified data item
>         for the designated number of periods
>    n    is the total number of periods in the exponential moving
>         average
> 
> 
>  Step 4: Calculation of the Directional Movement Index (DX):
> 
>         |PDI - MDI|
>    DX = ----------- * 100
>          PDI + MDI
> 
>    Notice here if you expand out the PDI and MDI terms, all TR terms
>    cancel out.  So you can safely eliminate TR from the calculation.
> 
> 
>  Step 5: Calculation of the Average Directional Movement Index (ADX):
> 
>  ADX = EMA(DX, n)
> 
> That's it.
> 
> -- 
>   ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
>  // +__>   Director of Research and Development
>  //  \ 
>  // __)    Unicorn Research Corporation -- http://unicorn.us.com
> 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Save Smiley. Help put Messenger back in the office.
http://us.click.yahoo.com/4PqtEC/anyFAA/i5gGAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


Attachment:
1ADX_sample.xls

Attachment: Description: "Description: MS-Excel spreadsheet"