GT::DB::Chart - GeniusTrader access to data from Chart
use GT::DB::Chart; my $db = GT::DB::Chart->new; my $prices = $db->get_prices ('BHP.AX', $GT::Prices::DAYS);
This is a GT::DB module giving access to the Chart database from GeniusTrader scripts and calculations.
GT::DB
$db = GT::DB::Chart->new()
Create and return a new GT::DB::Chart object to retrieve data from the Chart database (~/Chart/database.sqdb).
GT::DB::Chart
$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.
GT::Prices
$symbol
$timeframe
$DAYS
$WEEKS
$MONTHS
$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,
get_prices()
get_last_prices()
$limit
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.
undef
For most applications use $db->get_name() instead (see GT::DB), since it tries your ~/.gt/sharenames file if nothing from get_db_name().
$db->get_name()
get_db_name()
GT::DB, GT::Prices
App::Chart::Series::Database
http://user42.tuxfamily.org/chart/index.html
Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2015, 2016, 2017, 2018, 2019, 2020 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/.
To install App::Chart, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Chart
CPAN shell
perl -MCPAN -e shell install App::Chart
For more information on module installation, please visit the detailed CPAN module installation guide.