Calculate the KAMA of giving values.
composer require romulodl/kama
or add romulodl/kama
to your composer.json
. Please check the latest version in releases.
$kama = new Romulodl\Kama();
$kama->calculate(
array $values,
int $period = 7,
int $fastEma = 2,
int $slowEma = 30
);
For example:
$kama = new Romulodl\Kama();
$kama->calculate([10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
You would normally give a larger period to add smoothness to the result.