PureBytes Links
Trading Reference Links
|
Hi again, Roy
--- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
wrote:
> kut2k2
>
> LastValue(A) is brilliant for applying the current (last) value of
"A" as a
> constant to any function. What it will not do is apply the value of
"A" 100
> bars ago to any required function also 100 bars ago.
I thought I'd better reply for the benefit of you and others:
LastValue(A) does apply the value of A 100 bars ago to any required
function also 100 bars ago. But it does not retain that value for
future reference because the entire array of LastValue(A) is changed
with every new bar of data. LastValue(A+PREV-PREV) does retain past
values *if* it exists. Unfortunately what I want to do gives error
messages for LastValue(A+PREV-PREV). I am very disappointed that
MetaStock spent thousands of code lines on garbage like Gann angles
yet something truly useful like a real dynamic time-period goes
lacking. :-(
> When back testing and
> wishing to use a changing value as a constant then the code I
suggested will
> oblige in some situations.
>
> You only need to look at the two outputs ("B" and "D") from the
following
> simple example to see that there is a vast difference between the
two
> signals created. I think you'll find that the only bar where the
signals
> are identical is the last bar. Where and when you might use one or
the other
> is entirely up to you, but before you can do that you must
understand why
> there is a difference. I don't mean why the code works the way it
does but
> how it can be used knowing that it works the way it does.
>
> A:=CMO(C,9);
> A:=LastValue(A-PREV+PREV);
> D:=LastValue(A);
> B; D;
>
> Roy
>
> ----- Original Message -----
> From: "kut2k2" <no_reply@xxxxxxxxxxxxxxx>
> To: <equismetastock@xxxxxxxxxxxxxxx>
> Sent: Monday, April 28, 2003 6:21 PM
> Subject: Re: [EquisMetaStock Group] HHV(close,n)
>
>
> > --- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
> > wrote:
> > > Try this. It works with some functions and not others.
> > >
> > > A:=Int(Abs(CMO(C,9))/10)+1;
> > > B:=LastValue(A-PREV+PREV);
> > > D:=LastValue(A);
> A; D;
> > >
> > > Roy
> >
> > Hi,
> >
> > I've seen this before and I'm puzzled. Why is it necessary to add
and
> > subtract PREV when LastValue(A) seems to work well all by itself?
> > Thanks.
> > kut2k2
> >
> > >
> > > ----- Original Message -----
> > > From: "ihh3" <no_reply@xxxxxxxxxxxxxxx>
> > > To: <equismetastock@xxxxxxxxxxxxxxx>
> > > Sent: Tuesday, October 08, 2002 9:35 PM
> > > Subject: [EquisMetaStock Group] HHV(close,n)
> > >
> > >
> > > > N:=Input("A",1,10,5);
> > > > A:=Abs(CMO(C,9))/10;
> > > > { N:=A; ??? }
> > > > HHV(C,N);
> > > > {This variable or expression must contain only constant data}
> > > >
> > > > the hhv(c,opt1); is permitted.
> > > > the hhv(c,input("a",1,10,5)); is permitted.
> > > > but hhv(c,abs(cmo(c,9))/10); in not.
> > > >
> > > > anyone know how to have a multi-period HHV?
> > > >
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/O10svD/Me7FAA/uetFAA/BefplB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|