Paul Miller > stockmonkey-2.9013 > Math::Business::ATR

Download:
stockmonkey-2.9013.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 2.4   Source  

NAME ^

Math::Business::ATR - Technical Analysis: Average True Range

SYNOPSIS ^

  use Math::Business::ATR;

  my $atr = new Math::Business::ATR;
     $atr->set_days(14);

  # alternatively/equivilently
  my $atr = new Math::Business::ATR(14);

  # or to just get the recommended model ... (14)
  my $atr = Math::Business::ATR->recommended;

  my @data_points = (
      [ 5, 3, 4 ], # high, low, close
      [ 6, 4, 5 ],
      [ 5, 4, 4.5 ],
  );

  # choose one: 
  $atr->insert( @data_points );
  $atr->insert( $_ ) for @data_points;

  my $atr = $atr->query;

  if( defined( my $q = $atr->query ) ) {
      print "ATR: $q.\n";

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

RESEARCHER ^

The ATR was designed by J. Welles Wilder Jr circa 1978.

The ATR is meant to be a measure of the volatility of the stock price. It does not provide any indication of the direction of the moves, only how erratic the moves may be.

Wilder felt that large ranges meant traders are willing to continue bidding up (or selling down) a stock.

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

There is also a mailing list with very light traffic that you might want to join: http://groups.google.com/group/stockmonkey/.

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), Math::Business::StockMonkey, Math::Business::StockMonkey::FAQ, Math::Business::StockMonkey::CookBook

http://fxtrade.oanda.com/learn/graphs/indicators/atr.shtml