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(20, 2);
# or to just get the recommended model ... (20, 2);
my $bb = Math::Business::BollingerBands->recommended;
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) = $bb->query;
if( defined $M ) {
print "BB: $L < $M < $U.\n";
} else {
print "BB: n/a.\n";
}
RESEARCHER
The Bollinger Bands were designed by John Bollinger in the 1980s.
The bands provide a high and low water mark for the closing price. Volatility determines the width of the bands.
Conventional wisdom dictates that when prices consistently touch the upper band they are "overbought" and when they continually touch the lower band they are "oversold."
When the prices "bounce" off the lower band and cross the middle line, it is thought to indicate a buy-signal. The same (but opposite) could be said about bouncing off the upper band and crossing the middle line on the way down.
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. There is a mailing list with very light traffic that you might want to join: http://groups.google.com/group/stockmonkey/.
COPYRIGHT
Copyright © 2013 Paul Miller
LICENSE
This is released under the Artistic License. See perlartistic.
SEE ALSO
perl(1), Math::Business::StockMonkey, Math::Business::StockMonkey::FAQ, Math::Business::StockMonkey::CookBook
http://en.wikipedia.org/wiki/Bollinger_Bands
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:bollinger_bands