romulodl/macd
最新稳定版本:v3.0.0
Composer 安装命令:
composer require romulodl/macd
包简介
MACD without the PECL trader extension
README 文档
README
Calculate the MACD of giving values.
Instalation
composer require romulodl/macd
or add romulodl/macd to your composer.json. Please check the latest version in releases.
Usage
$macd = new Romulodl\Macd(); $macd->calculate(array $values, int $short_period = 12, int $long_period = 26, int $signal_period = 9); //returns an array values with the macd and signals //for example // [ [ 100, // macd value 90 // signal value ], [ 99, //macd value from the previous candle 89 // signal value from the previous candle ] ]
For example:
$macd = new Romulodl\Macd(); $macd->calculate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]);
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 uses the MACD as a basic step.
统计信息
- 总下载量: 526
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2020-05-26