[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GT] New EMA



Weigert, Thomas wrote:
SMA uses arg_dependency, not indicator dependency
Zigzag does not have any dependencies, nor does it use
calculate_interval
HilbertPeriod does not use calculate_interval
The old version of ema had all kinds of error messages and did abort.

Basically, if your indicator calls $self->check_dependencies_interval
and it uses indicator dependencies, then it will abort when these
dependencies are not satisfied throughout the interval.

Maybe we can check why there is this difference between arg_dependencies
and indicator_dependencies and maybe adjust the latter.

add_arg_dependency calls add_indicator_dependency if object is indicator class
or add_signal_dependency if object is signal class

maybe indicators (and signals) should only use add_arg_dependencies
and let it handle it from there?

ras

But currently
that is what is happening.... I could try to make the EMA work like SMA
as one need not do the check on the interval (it just uses the
dependencies to compute the SMA for the starting value.

Th.


-----Original Message-----
From: Robert A. Schmied [mailto:ras
AT
acm.org]
Sent: Friday, February 29, 2008 12:41 AM
To: devel
AT
geniustrader.org
Subject: Re: [GT] New EMA

Weigert, Thomas wrote:

I think most indicators in GT work like this:

maybe most, but not all ...


sma for example has a "calculate_interval", doesn't abort.
zigzag, the prior version of ema ;-), HilbertPeriod, don't abort
(ah just because the method is the doesn't mean it's actually

invoked!)