From: GeniusTrader C. r. <ra...@ge...> - 2003-06-07 22:32:19
|
Update of /bourse/cvsroot/GT In directory arrakis:/scratch/tmp/cvs-serv20259 Modified Files: Dependency.pm Indicators.pm Log Message: - New indicators & graphical objects from Oliver Bossert. - Many indicators updated by Oliver Bossert. - Various fixes for the graphics stuff, including contributions from Oliver. - Misc fixes to the dependency checking algorithm. --- /bourse/cvsroot/GT/Dependency.pm 2002/10/06 15:39:24 1.8 +++ /bourse/cvsroot/GT/Dependency.pm 2003/06/07 20:29:10 1.9 @@ -275,8 +275,10 @@ if (! $self->dependencies_are_available($calc, $i)) { $self->compute_dependencies($calc, $i); + } else { + return DVAL 1; } - return DVAL 1; + return DVAL $self->dependencies_are_available($calc, $i); } sub check_dependencies_interval { DFEATURE my $f; @@ -289,8 +291,10 @@ if (! $self->dependencies_are_available_interval($calc, $first, $last)) { $self->compute_dependencies_interval($calc, $first, $last); + } else { + return DVAL 1; } - return DVAL 1; + return DVAL $self->dependencies_are_available_interval($calc, $first, $last); } =item C<< $object->dependencies_are_available($calc, $i) >> @@ -384,6 +388,7 @@ # Compute indicators foreach ($self->get_indicator_dependencies()) { + DTRACE "Compute dependencies for $self : $_->{'indicator'}\n"; if ($_->{'nbdays'} > 1) { $_->{'indicator'}->calculate_interval($calc, @@ -396,6 +401,7 @@ # Compute signals foreach ($self->get_signal_dependencies()) { + DTRACE "Compute dependencies for $self : $_->{'signal'}\n"; if ($_->{'nbdays'} > 1) { $_->{'signal'}->detect_interval($calc, @@ -414,6 +420,7 @@ # Compute indicators foreach ($self->get_indicator_dependencies()) { + DTRACE "Compute dependencies for $self : $_->{'indicator'}\n"; $_->{'indicator'}->calculate_interval($calc, $first - $_->{'nbdays'} + 1, $last); } @@ -421,6 +428,7 @@ # Compute signals foreach ($self->get_signal_dependencies()) { + DTRACE "Compute dependencies for $self : $_->{'indicator'}\n"; $_->{'signal'}->detect_interval($calc, $first - $_->{'nbdays'} + 1, $last); } --- /bourse/cvsroot/GT/Indicators.pm 2003/06/05 23:04:07 1.7 +++ /bourse/cvsroot/GT/Indicators.pm 2003/06/07 20:29:10 1.8 @@ -18,6 +18,7 @@ use GT::Registry; use GT::Dependency; use GT::ArgsTree; +use Carp::Datum; =head1 NAME @@ -126,6 +127,7 @@ =cut sub calculate_all { + DFEATURE my $f; my ($self, $calc) = @_; my $c = $calc->prices->count; my $indic = $calc->indicators; @@ -135,6 +137,7 @@ { $calc->indicators->set_available($self->get_name($i), $c - 1); } + return DVOID; } =item C<< $indic->calculate_interval($calc, $first, $last) >> @@ -148,6 +151,7 @@ =cut sub calculate_interval { + DFEATURE my $f; my ($self, $calc, $first, $last) = @_; if (ref($self->{'args'}) =~ /GT::ArgsTree/) { @@ -157,6 +161,7 @@ { $self->calculate($calc, $i); } + return DVOID; } =item C<< $indic->initialize() >> |