[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [GT] New EMA and backup SEMA
This is the same thing. If you don't give a parameter to get_arg_names,
it gives all the parameters. Actually, this is safer, as it uses all the
arguments for SMA, not just the first 2 (in case there were more).
> -----Original Message-----
> From: kw [mailto:gt
AT
netsrak.net]
> Sent: Friday, February 29, 2008 11:01 AM
> To: devel
AT
geniustrader.org
> Subject: RE: [GT] New EMA and backup SEMA
>
> I'm not sure if it might help, but changing
> $self->{'sma'} =
> GT::Indicators::SMA->new([ $self->{'args'}->get_arg_names()]);
>
> to
>
> $self->{'sma'} =
> GT::Indicators::SMA->new([ $self->{'args'}->get_arg_names(1),
> $self->{'args'}->get_arg_names(2) ]);
>
> would be more explicit. Are those two line identical?? I don't know!
>
> cheers,
>
> Karsten
>
>
> On Fri, 2008-02-29 at 10:00 -0600, Weigert, Thomas wrote:
> > I should give a word of caution regarding the reimplemented EMA.
> >
> > While I tested it and compared it with TA_lib regarding output, and
> > found it to work, both when used inside of indicators and when used
from
> > the command line, I found one situation where it does not work as it
> > should:
> >
> > When I use it inside of the SMI I recently wrote (a rather complex
use
> > of nested indicators) I find that for some reason I don't understand
the
> > SMA that starts of the EMA is not recorded properly, and so the EMA
> > fails. I cannot see what causes that but am exploring. (If I change
the
> > computation of the starting point to just use the current value
rather
> > than the n-day SMA, then there are no problems.) Note that while
having
> > many other problems, the original EMA did not have this difficulty.
> >
> > I imagine it has to do with the nesting of indicators and
dependencies
> > and the I:Generic:ByName, that somewhere some update gets lost. I
will
> > explore further and hopefully uncover another important insight re
GT
> > which I am obviously still missing....
> >
> > I am attaching SEMA.pm, which is the EMA starting with the actual
value
> > of the data series.
> >
> > Th.
> >
> > > -----Original Message-----
> > > From: Robert A. Schmied [mailto:ras
AT
acm.org]
> > > Sent: Friday, February 29, 2008 1:38 AM
> > > To: devel
AT
geniustrader.org
> > > Subject: Re: [GT] New EMA
> > >
> > >
> > > 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.
> > > >
> >
- References:
- [GT] New EMA, Weigert, Thomas (2008/02/29)
- Re: [GT] New EMA, Robert A. Schmied (2008/02/29)
- RE: [GT] New EMA, Weigert, Thomas (2008/02/29)
- Re: [GT] New EMA, Robert A. Schmied (2008/02/29)
- RE: [GT] New EMA, Weigert, Thomas (2008/02/29)
- Re: [GT] New EMA, Robert A. Schmied (2008/02/29)
- RE: [GT] New EMA, Weigert, Thomas (2008/02/29)
- Re: [GT] New EMA, Robert A. Schmied (2008/02/29)
- RE: [GT] New EMA and backup SEMA, Weigert, Thomas (2008/02/29)
- RE: [GT] New EMA and backup SEMA, kw (2008/02/29)