Seer logo - advanced backtesting for stock, futures and forex trading systems using using technical analysis indicators, charts, money management and position sizing
SID NameDescriptionRatingUpdated
527 ADXADX indicatorNot Approved2008-07-13

technical analysis indicatorThe logic for this technical analysis indicator:

#The ADX is part of directional movement developed by Welles Wider.
my ($period)=@_;  
ValidatePeriods($period);  

my $yeshigh=Ref(High,-1);
my $yeslow=Ref(Low,-1);

my $PlusDM= If(High>$yeshigh & Low>=$yeslow, High-$yeshigh, 
            If(High>$yeshigh  & Low<$yeslow & High-$yeshigh >$yeslow-Low,High-$yeshigh,0));

my $MinusDM= If(Low<$yeslow & High<=$yeshigh, $yeslow-Low, 
             If(High>$yeshigh & Low<$yeslow& High-$yeshigh<$yeslow-Low,$yeslow-Low,0));

my $diplus= 100 * WWS($PlusDM,$period) / ATR($period);
my $diminus= 100 * WWS($MinusDM,$period) / ATR($period);

my $adx= 100 * WWS(abs($diplus-$diminus)/($diplus+$diminus), $period,$period);
#Name the columns
my $name="ADX($period)";
SetColumnName($adx,$name);
SetColumnName($diplus,"+DI:$period");
SetColumnName($diminus,"-DI:$period");

return ($adx,$diplus,$diminus);

© 2008 seer trading systems ltd
feedback FAQ legal privacy