PHPackages                             romulodl/mfi - 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/mfi

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

romulodl/mfi
============

calculate the Money Flow Index in pure PHP

v1.0.0(5y ago)2692Apache-2.0PHPCI failing

Since Jun 27Pushed 5y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Money Flow Index
================

[](#money-flow-index)

[![MFI](https://github.com/romulodl/mfi/workflows/MFI/badge.svg)](https://github.com/romulodl/mfi/workflows/MFI/badge.svg)

Calculate the Money Flow Index (MFI) in pure PHP

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

[](#instalation)

```
composer require romulodl/mfi

```

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

Usage
-----

[](#usage)

```
$mfi = new Romulodl\Mfi();
$mfi->calculate(array $hlcv_values); // [high, low, close, volume]
//returns float
```

Example of use:

```
$mfi = new Romulodl\Mfi();
$mfi->calculate([
  [9950.00,9250.66,9786.80,602528.438],
  [9843.50,9100.00,9310.73,504107.096],
  [9585.00,9210.03,9374.99,287768.201],
  [9880.00,9317.16,9678.57,300859.340],
  [9958.67,9450.00,9731.10,363732.370],
  [9900.00,9462.00,9773.64,376313.845],
  [9838.00,9281.42,9508.11,334423.590],
  [9573.00,8812.20,9060.00,461439.193],
  [9259.38,8920.00,9166.40,276008.073],
  [9300.00,9076.90,9176.41,201589.660],
  [9294.44,8674.00,8711.37,339643.378],
  [8977.00,8623.38,8895.65,302980.106],
  [9011.82,8693.18,8837.05,275619.158],
  [9230.00,8811.00,9197.32,272253.998],
]);
```

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 which will need the MFI value as part of the calculation.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2151d ago

### 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 (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-personal-data-export

Create personal data downloads in a Laravel app

550543.8k8](/packages/spatie-laravel-personal-data-export)[fresh/transliteration

PHP library for transliteration.

52135.6k1](/packages/fresh-transliteration)[experius/module-addresslines

Add labels to address lines and configuration for each address line.

44109.5k](/packages/experius-module-addresslines)

PHPackages © 2026

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