romulodl/kama

Kama without the PECL trader extension

Maintainers

Details

github.com/romulodl/kama

Source

Issues

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/romulodl/kama

v1.0.0 2021-07-06 22:06 UTC

This package is auto-updated.

Last update: 2025-10-07 07:53:30 UTC


README

Calculate the KAMA of giving values.

Jma

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.