JMA without the PECL trader extension

Maintainers

Details

github.com/romulodl/jma

Source

Issues

Installs: 21

Dependents: 0

Suggesters: 0

Security: 0

Stars: 14

Watchers: 1

Forks: 3

Open Issues: 0

pkg:composer/romulodl/jma

v2.1.0 2020-12-19 23:52 UTC

This package is auto-updated.

Last update: 2025-10-20 10:45:46 UTC


README

Calculate the JMA of giving values.

Jma

Instalation

composer require romulodl/jma

or add romulodl/jma to your composer.json. Please check the latest version in releases.

Usage

$jma = new Romulodl\Jma();
$jma->calculate(
  array $values,
  int $period = 7,
  int $phase = 50,
  float $power = 2
);

For example:

$jma = new Romulodl\Jma();
$jma->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.