NAME

Math::Business::BollingerBands - Technical Analysis: Bollinger Bands

SYNOPSIS

use Math::Business::BollingerBands;

my $bb = new Math::Business::BollingerBands;
   $bb->set_days(20);
   $bb->set_deviations(2);

# alternatively/equivalently
my $bb = new Math::Business::BollingerBands;

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: 
$bb->insert( @closing_values );
$bb->insert( $_ ) for @closing_values;

my ($L,$M,$U) = $sma->query;
if( defined $M ) {
    print "BB: $L < $M < $U.\n";

} else {
    print "BB: n/a.\n";
}

# you may use this to kick start 
$bb->start_with( @closes );

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)

http://en.wikipedia.org/wiki/Bollinger_Bands

http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:bollinger_bands