Skip to content
/ kama Public

Kaufman Adaptative Moving Average (KAMA) in pure PHP

Notifications You must be signed in to change notification settings

romulodl/kama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kaufman Adaptative Moving Average

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.

About

Kaufman Adaptative Moving Average (KAMA) in pure PHP

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages