I see.  I replace simple moveing average with wilders average and now the codes 
work same as the Amibroker built-in ADX


Thanks/ Tom


  ----- Original Message ----- 
  From: sebastiandanconia 
  To: [email protected] 
  Sent: Saturday, December 16, 2006 12:14 AM
  Subject: [amibroker] Re: AFL: ADX CODES


  The difference is in the way the calculations are smoothed. Wilder had
  his own method for calculating a moving average, and you get different
  values depending on whether you use his original method (from before the
  time when PCs were available), an exponential ma, a simple ma, weighted
  ma, etc.

  S.

  --- In [email protected], "itmwh" <[EMAIL PROTECTED]> wrote:
  >
  > I previously used following codes for ADX in another charting
  software,
  > but I found AB must have a different version of ADX
  >
  > Could someone tell me what is the difference ?
  >
  > Thanks
  >
  > Tom
  > ----------------------------------------------------------
  >
  > TR = SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF
  > (CLOSE,1))),P);
  > HD = HIGH-REF(HIGH,1);
  > LD = REF(LOW,1)-LOW;
  > DMP= SUM(IF(HD>0 AND HD>LD,HD,0),P);
  > DMM= SUM(IF(LD>0 AND LD>HD,LD,0),P);
  > PDI=DMP*100/TR;
  > MDI=DMM*100/TR;
  > ADX= MA(ABS(MDI-PDI)/(MDI+PDI)*100,P);
  >



   

Reply via email to