The SMMA is a smoothed moving average, almost a blend of the simple mo 0

Posted on 12, March 2014

in Category SID


Description for SMMA SID 993

The SMMA is a smoothed moving average, almost a blend of the simple moving average with the exponential moving average

The SMMA is a smoothed moving average, almost a blend of the simple mo/sid The logic for this technical analysis indicator:

#The SMMA is a smoothed moving average, almost a blend of the simple moving average with the exponential moving average.
#Similar to all the other moving averages, the SMMA is used for identifying trends, only that the SMMA is developed to filter the majority of market noise in order to generate results with refined accuracy.
my ($col,$period) = @_;
my $sum1 = Sum($col,$period);
my $moving = NewColumn("SMMA($col,$period)");

SetValue($moving,0,Value($sum1/$period,0));

my $i;

for $i (1..NumberOfBars-1) {
	my $data = ((Value($sum1,$i-1) - Value($moving,$i-1) + Value($col,$i)) / $period);

	if($data >= 0){
		SetValue($moving,$i,$data);
	}
}

return $moving;

0 Comments

Leave a Message