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

[amibroker] Re: AFL: ADX CODES



PureBytes Links

Trading Reference Links

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 amibroker@xxxxxxxxxxxxxxx, "itmwh" <toxutao@xxx> 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);
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.20/588 - Release Date: 12/15/2006 10:02 AM