hull moving average
use
Math::Business::HMA;
my
$avg
= new Math::Business::HMA;
$avg
->set_days(8);
my
@closing_values
=
qw(
3 4 4 5 6 5 6 5 5 5 5
6 6 6 6 7 7 7 8 8 8 8
)
;
# choose one:
$avg
->insert(
@closing_values
);
$avg
->insert(
$_
)
for
@closing_values
;
if
(
defined
(
my
$q
=
$avg
->query) ) {
print
"value: $q.\n"
;
}
else
{
print
"value: n/a.\n"
;
}
READ MORE: hull moving average _ hull moving average
0 commentaires
Enregistrer un commentaire