Perl Math::Business::EMA help
Posted
by Dustin
on Stack Overflow
See other posts from Stack Overflow
or by Dustin
Published on 2010-04-07T11:53:54Z
Indexed on
2010/04/07
13:13 UTC
Read the original article
Hit count: 316
Script pulls data from mysql:
$DBI::result = $db->prepare(qq{
SELECT close
FROM $table
WHERE day <= '$DATE'
ORDER BY day DESC
LIMIT $EMA
});
$DBI::result->execute();
while($row = $DBI::result->fetchrow) {
print "$row\n";
};
with the following example results:
1.560 1.560 1.550...
But I need to work out the EMA using Math::Business::EMA; and I'm not sure how to calculate this while maintaining the accuracy. EMA is weighted and My lack of Perl knowledge is not helping.
© Stack Overflow or respective owner