我刚刚将 TA-Lib / trader 安装到我的 php 安装中,一切顺利。我的 PHP 不是很好,即使有交易者文档,我也只需要一些指导。我想从我的数据库中加载一组值并将它们发送到“trader_sma”以获得小的移动平均线。我的伪代码看起来像:
<?php
$finance = $dbrequest("SELECT close_price FROM market_table WHERE stock='$symbol');
//So now $finance is an array with all of the stocks closing prices
//how do I place it into this function? I also need to 'count' the rows in
//the array to send them into $timePeriod?
//array trader_sma ( array $real [, integer $timePeriod ] )
?>
任何帮助表示赞赏。谢谢。