stock,stock calc,php stock,macd,rsi,boll,trix,roc,bias,dma,kdj,cci,wr,obv,psy,arbr,dmi
// 1
composer create-project topthink/think tpstock
// 2
composer require lupecode/php-trader-native
// 安装php-trader-native后找到vendor/lupecode/php-trader-native/source/Trader.php文件第238行,改写$newOutReal[$index + $offset] = $inDouble;如下
$newOutReal[$index + $offset] = number_format($inDouble,3,'.',''); // 四舍五入保留3位,自行决定是否修改
dd(Factor::macd(1,0)); // 1为stock_id,0表示仅返回最新那天的指标,如果为1则表示返回全部的天数指标