NAME
Math::Business::RSI - Technical Analysis: Relative Strength Index
SYNOPSIS
use Math::Business::RSI;
my $rsi = new Math::Business::RSI;
$rsi->set_days(14);
# alternatively/equivilently
my $rsi = new Math::Business::RSI(14);
my @closing_values = qw(
3 4 4 5 6 5 6 5 5 5 5
6 6 6 6 7 7 7 8 8 8 8
);
# choose one:
$rsi->insert( @closing_values );
$rsi->insert( $_ ) for @closing_values;
if( defined(my $q = $sma->query) ) {
print "RSI: $q.\n";
} else {
print "RSI: n/a.\n";
}
# you may use this to kick start
$rsi->start_with( $U, $D, $cy );
# you may fetch those values with these
my $U = $rsi->query_EMA_U;
my $D = $rsi->query_EMA_D;
my $cy = $rsi->query_cy; # (close yesterday)
Thanks
Todd Litteken PhD <cl@xganon.com>
AUTHOR
Paul Miller <jettero@cpan.org>
I am using this software in my own projects... If you find bugs, please please please let me know.
I normally hang out on #perl on freenode, so you can try to get immediate gratification there if you like. irc://irc.freenode.net/perl
COPYRIGHT
Copyright (c) 2008 Paul Miller -- LGPL [Software::License::LGPL_2_1]
perl -MSoftware::License::LGPL_2_1 \
-e '$l = Software::License::LGPL_2_1->new({
holder=>"Paul Miller"});
print $l->fulltext' | less
SEE ALSO
perl(1)