array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.trader-macd.php', 1 => 'trader_macd', ), 'up' => array ( 0 => 'ref.trader.php', 1 => 'Trader Functions', ), 'prev' => array ( 0 => 'function.trader-ma.php', 1 => 'trader_ma', ), 'next' => array ( 0 => 'function.trader-macdext.php', 1 => 'trader_macdext', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/trader/functions/trader-macd.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL trader >= 0.2.0)
trader_macd — Moving Average Convergence/Divergence
real
Array of real values.
fastPeriod
Number of period for the fast MA. Valid range from 2 to 100000.
slowPeriod
Number of period for the slow MA. Valid range from 2 to 100000.
signalPeriod
Smoothing for the signal line (nb of period). Valid range from 1 to 100000.
Returns an array with calculated data or false on failure.