romulodl / kama
Kama without the PECL trader extension
v1.0.0
2021-07-06 22:06 UTC
Requires (Dev)
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2024-12-07 06:02:51 UTC
README
Calculate the KAMA of giving values.
Instalation
composer require romulodl/kama
or add romulodl/kama
to your composer.json
. Please check the latest version in releases.
Usage
$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.