The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GT::DB::Chart - GeniusTrader access to data from Chart

SYNOPSIS

 use GT::DB::Chart;
 my $db = GT::DB::Chart->new;
 my $prices = $db->get_prices ('BHP.AX', $GT::Prices::DAYS);

DESCRIPTION

This is a GT::DB module giving access to the Chart database from GeniusTrader scripts and calculations.

FUNCTIONS

$db = GT::DB::Chart->new()

Create and return a new GT::DB::Chart object to retrieve data from the Chart database (~/Chart/database.sqdb).

$db->disconnect()

Disconnect from the Chart database.

$prices = $db->get_prices ($symbol, $timeframe)
$prices = $db->get_last_prices ($symbol, $limit, $timeframe)

Create and return a GT::Prices object with the data for $symbol in the given $timeframe increments. $timeframe can be $DAYS, $WEEKS, $MONTHS or $YEARS.

get_prices() returns all available data for $symbol, get_last_prices() returns only the most recent $limit many values (or as many as available). For example to get the last 250 trading days,

    my $prices = $db->get_last_prices ('GM', 250,
                                       $GT::Prices::DAYS);
$str = $db->get_db_name ($symbol)

Return the company name for the stock $symbol, or undef if unknown.

For most applications use $db->get_name() instead (see GT::DB), since it tries your ~/.gt/sharenames file if nothing from get_db_name().

SEE ALSO

GT::DB, GT::Prices

App::Chart::Series::Database

HOME PAGE

http://user42.tuxfamily.org/chart/index.html

LICENCE

Copyright 2008, 2009, 2010, 2011, 2012, 2014 Kevin Ryde

Chart is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Chart is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Chart; see the file COPYING. Failing that, see http://www.gnu.org/licenses/.