| SID Name | Description | Rating |  | 559 MACDDEMA | MACD like technical analysis indicator using Double Exponential Moving Average (DEMA) instead of EMA | Not Rated |
 | The logic for this technical analysis indicator: |
#MACD like technical analysis indicator using Double Exponential Moving
#Average (DEMA) instead of EMA
my ($period1,$period2,$smooth)=@_;
#Validate the periods
ValidatePeriods($period1,$period2,$smooth);
#create the columns...
my $macdline = DEMA(Close,$period1)-DEMA(Close,$period2);
my $macds = DEMA($macdline,$smooth);
my $macdhist = $macdline-$macds;
#rename the columns
my $name="MACDDEMA($period1,$period2,$smooth)";
SetColumnName($macdline , "$name:line");
SetColumnName($macds , "$name:signal");
SetColumnName($macdhist , "$name:hist");
#create the indicator with the columns
return ($macdline,$macds,$macdhist);
|