DB::MetaStockReader access module


The MetaStockReader access module is able to retrieve quotes from almost any type of MetaStock database.

This module does not require any other code to support its operation and it is not intended to be used with GT::DB::MetaStock and, although named MetaStockReader, it is not the companion program required by GT::DB::MetaStock.


   my $db = create_standard_object("DB::" . GT::Conf::get("DB::module"));
   my $db = create_standard_object("DB::" . GT::Conf::get("DB::module"));
   $db->initialize is used to initialize the isin code list.
   Function "get_prices" first test if the isin code is initiasize, if not
it call the function "initialize".


This module read the MASTER and the XMASTER file of you security directory to get quotes, with a directory and a symbol as main parameters. The MASTER file contain only the 255 first file (*.DAT) security of your directory. The XMASTER file all the others security (*.MWD) of your directory.


NOTE: this module supercedes the module GT::DB::MetaStock. do not attempt to use both.

You can indicate the directory which contains the MetaStock database by setting the DB::metastock::directory configuration item.


Create a new DB object used to retry quotes from a MetaStock database.


Disconnects from the database.


Construct the list of isin code.


Indicate the directory containing your equity.


Read the MASTER file of your directory containing your equity.


Read the XMASTER file of your directory containing your equity.


Return the description for the symbol $code.


Return the name for the symbol $code.

$db->get_prices($code, $timeframe)

Returns a GT::Prices object containing all known prices for the symbol $code.


Convert a MSBIN format to a float perl format (4 bytes). It convert first to a IEEE float format (4 bytes).

$db->get_last_prices($code, $limit, $timeframe)

NOT YET SUPPORTED for MetaStockReader module.

Returns a GT::Prices object containing the $limit last known prices for the symbol $code.


Copyright 2003-2005 Tournedouet Yannick.