Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
romulodl committed May 16, 2020
0 parents commit b023714
Show file tree
Hide file tree
Showing 7 changed files with 1,772 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# editorconfig.org
root = true

[*]
indent_style = space
end_of_line = lf
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{html,twig,md}]
indent_size = 2

[*.php]
charset = utf-8
indent_style = tab
indent_size = 4

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Exponential Moving Average

## Instalation

```
composer require romulodl/ema
```

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

## Usage

```php
$ema = new Romulodl\Ema();
$ema->calculate([10, 12, 14, 20, 14, 10, 11]);
```

it also contains a static method:

```php
Ema::calculateStatic([10, 12, 14, 20, 14, 10, 11]);
```


## 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 EMA as a basic step.
I am also planning to open-source the other indicators (not the trading bot)
19 changes: 19 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "rdelazzari/ema",
"description": "EMA without the PECL trader extension",
"require-dev": {
"phpunit/phpunit": "^8.5"
},
"authors": [
{
"name": "Romulo De Lazzari",
"email": "[email protected]"
}
],
"require": {},
"autoload": {
"psr-4": {
"Romulodl\\": "src/"
}
}
}
Loading

0 comments on commit b023714

Please sign in to comment.