I just installed TA-Lib / trader into my php installation and it's good to go. My PHP isn't great and even with the trader documentation I just need a bit of guidance. I want to load an array of values from my database and send them into "trader_sma" to get the small moving average. My pseudo code will look something like:
<?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 ] )
?>
Any help appreciated. Thanks.