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

NAME

Finance::GeniusTrader::Dependency - A dependency system for indicators/signals/systems.

DESCRIPTION

This module is inheritated by any object which needs a Dependency mechanism. That's why it's listed in @ISA of Finance::GeniusTrader::Indicators, Finance::GeniusTrader::Signals, GT:Systems and several other modules ...

$object->add_indicator_dependency($indic, $nbdays)
$object->add_signal_dependency($signal, $nbdays)
$object->add_prices_dependency($nbdays)
$object->add_arg_dependency($argnum, $nbdays)
$object->add_volatile_indicator_dependency($indic, $nbdays)
$object->add_volatile_signal_dependency($signal, $nbdays)
$object->add_volatile_prices_dependency($nbdays)
$object->add_volatile_arg_dependency($argnum, $nbdays)

Add a dependency on a precise indicator or signal. The current object needs nbdays of history (current day included) on the given indicator or signal to be able to produce a result. A prices dependency indicates the number of days of history prices

A volatile dependency will be removed by $object->remove_volatile_dependencies(). It is used for adding last-minute dependencies whose values are known late because they are computed based on other data.

$object->get_prices_dependency()
$object->get_signal_dependencies()
$object->get_indicator_dependencies()

Return the dependency or list of dependencies.

$object->remove_volatile_dependencies()

Removes all volatile dependencies.

$object->days_required

Returns the number of days required so that the object can produce a result.

($first, $last) = $object->update_interval($calc, $first, $last)

Check the limits of the interval. Return new limits. The interval is contained in the first interval but all days will produce a result. The new interval may be equal to the given interval.

$object->check_dependencies($calc, $i)
$object->check_dependencies_interval($calc, $first, $last)

Check that there is enough data available. If there isn't return false. Otherwise make sure the required data are computed and return true.

$object->dependencies_are_available($calc, $i)
$object->dependencies_are_available_interval($calc, $first, $last)

Check if all dependencies have been computed.

$object->compute_dependencies($calc, $i)
$object->compute_dependencies_interval($calc, $first, $last)

Calculate all dependent indicators and detect all dependent signals.