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.
$db = GT::DB::Chart->new()
Create and return a new
GT::DB::Chartobject to retrieve data from the Chart database (~/Chart/database.sqdb).
Disconnect from the Chart database.
$prices = $db->get_prices ($symbol, $timeframe)
$prices = $db->get_last_prices ($symbol, $limit, $timeframe)
Create and return a
GT::Pricesobject with the data for
$symbolin the given
get_prices()returns all available data for
get_last_prices()returns only the most recent
$limitmany 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
For most applications use
GT::DB), since it tries your ~/.gt/sharenames file if nothing from
Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2015, 2016, 2017, 2018, 2019 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/.