From: Weigert, T. <we...@ms...> - 2008-02-26 23:24:16
|
Since we are already in the process of navigating the dark corners of GT, here is something that has been puzzling me for quite some time: Take a look at STO.pm. When computing the internally used data series, it defines the %d_slow as: $self->{'%d_slow'} = GT::Indicators::SMA->new([ $self->{'args'}->get_arg_names(4), "{I:Generic:ByName " . $self->{'%k_slow'}->get_name(0) . "}" ]); Which translates, for example, into SMA[60,{I:Generic:ByName SMA[60, {I:Generic:ByName %K Fast[120]} ]}] That led me to wonder, why would this not be defined as $self->{'%d_slow'} = GT::Indicators::SMA->new([ $self->{'args'}->get_arg_names(4), "{I:Generic:ByName " . $self->get_name(2) . "}" ]); Which would be SMA[60,{I:Generic:ByName %D SLOW[120,60]}] And the latter should be exactly the same as the former, as {I:Generic:ByName SMA[60, {I:Generic:ByName %K Fast[120]} ]} = {I:Generic:ByName %D SLOW[120,60]} But running the so modified indicator yields no results for %d_slow; the output is just empty for that value. Then I thought, maybe now we need to define a dependency on %d_slow, e.g., $self->add_volatile_indicator_dependency($self->{'%k_slow'}, $self->{'args'}->get_arg_constant(4)); But once you do that, there are no values computed for any values of the indicator! So, what is the difference between obtaining the value of the indicator in one position (for %k_fast, or STO/1) from obtaining the value in a different position (for %k_slow, or STO/3)? Any hints are greatly appreciated.... Th. |