I found the stockmonkey lib quite interesting. However, I am not
quite sure that what parameter I should pass to MACD::insert(). If I
have the historical data(price, volume), what should I pass to the
function in order to get the right result as my software did?
Thanks in advance!
Heidel
http://search.cpan.org/perldoc?Math::Business::MACD
> what parameter I should pass to MACD::insert()
This is all you need to know:
# choose one:
$macd->insert( @closing_values );
$macd->insert( $_ ) for @closing_values;
I'm not opposed to adding more examples, but I'm not sure what it
should show. The MACD is set of calculations based on one scalar
(usually the closing price).
> get the right result
I'm not sure what you're asking, but I think there's a FAQ entry about
this. Frequently calculations like MACD and DMI differ from site to
site and author to author. There isn't 100% general agreement on the
One True Way to calculate these things, so I went with the original
inventors methods where possible.
http://search.cpan.org/perldoc?Math::Business::StockMonkey::FAQ
-Paul