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

DB::MetaStockReader access module

Overview

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 Finance::GeniusTrader::DB::MetaStock and, although named MetaStockReader, it is not the companion program required by Finance::GeniusTrader::DB::MetaStock.

Synopsis

   my $db = create_standard_object("DB::" . Finance::GeniusTrader::Conf::get("DB::module"));
   $db->initialize;
   $db->get_prices("FR0000130007");
   $db->disconnect;
or
   my $db = create_standard_object("DB::" . Finance::GeniusTrader::Conf::get("DB::module"));
   $db->get_prices("FR0000130007");
   $db->disconnect;

   $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".

Note

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.

Configuration

NOTE: this module supercedes the module Finance::GeniusTrader::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.

new()

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

$db->disconnect

Disconnects from the database.

$db->initialize

Construct the list of isin code.

$db->set_directory("/new/directory")

Indicate the directory containing your equity.

$db->read_master

Read the MASTER file of your directory containing your equity.

$db->read_xmaster

Read the XMASTER file of your directory containing your equity.

$db->find_isin($code)

Return the description for the symbol $code.

$db->get_db_name($code)

Return the name for the symbol $code.

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

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

$db->puissance($value00,$value01,$value02,$value03)

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 Finance::GeniusTrader::Prices object containing the $limit last known prices for the symbol $code.

COPYRIGHT

Copyright 2003-2005 Tournedouet Yannick.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 433:

=back without =over