PHPackages                             romulodl/ema - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. romulodl/ema

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

romulodl/ema
============

EMA without the PECL trader extension

v3.0.0(5y ago)77602[1 PRs](https://github.com/romulodl/ema/pulls)2Apache-2.0PHPCI passing

Since May 16Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/romulodl/ema)[ Packagist](https://packagist.org/packages/romulodl/ema)[ RSS](/packages/romulodl-ema/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)Dependencies (1)Versions (10)Used By (2)

Exponential Moving Average
==========================

[](#exponential-moving-average)

Calculate the EMA of giving values.

[![Ema](https://github.com/romulodl/ema/workflows/Ema/badge.svg)](https://github.com/romulodl/ema/workflows/Ema/badge.svg)

Instalation
-----------

[](#instalation)

```
composer require romulodl/ema

```

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

Usage
-----

[](#usage)

```
$ema = new Romulodl\Ema();
$values = $ema->calculate(array $values, int $period = 9);
// return array, $values[0] being the last one
```

For example:

```
$ema = new Romulodl\Ema();
$ema->calculate([10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
```

Why did you do this?
--------------------

[](#why-did-you-do-this)

The PECL Trading extension is crap and not everyone wants to install it. I am building a trading bot and building more complex trading indicators that use the EMA as a basic step.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance61

Regular maintenance activity

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~45 days

Total

7

Last Release

2012d ago

Major Versions

v1.3.0 → v2.0.02020-05-28

v2.1.0 → v3.0.02020-11-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/727de2473b3f8e612546e83f5831779cd5928b4af8ed6ca3f91a533b522b7a0a?d=identicon)[romulodl](/maintainers/romulodl)

---

Top Contributors

[![romulodl](https://avatars.githubusercontent.com/u/922624?v=4)](https://github.com/romulodl "romulodl (11 commits)")

---

Tags

ematradetrading

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/romulodl-ema/health.svg)

```
[![Health](https://phpackages.com/badges/romulodl-ema/health.svg)](https://phpackages.com/packages/romulodl-ema)
```

###  Alternatives

[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
