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

Re: More PREV Stuff



PureBytes Links

Trading Reference Links

Not surprising, I am confused.  How should the PREV function be used?
Lionel Issen
lissen@xxxxxxxxx
----- Original Message -----
From: <wooglin.org@xxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Friday, March 23, 2001 12:49 PM
Subject: Re: More PREV Stuff


> I suspect the answer lies in the "Operator Precedence" in conjunction with
> the PREV function. If Operator Precedence is not involved, you must
> recognize that the PREV constant cannot be treated in a conventional
> algebraic context like any other constant or variable. That is, you cannot
> multiply or divide through an expression to eliminate a PREV. For instance
> (PREV(C+PREV) is not the same as C*PREV + PREV^2 or (Pr+PREV-PREV) is not
> the same as Pr.
>
> Jim Barone
>
> ----- Original Message -----
> From: C.S. <csaxe@xxxxxxxxxxx>
> To: MetaStock List <metastock@xxxxxxxxxxxxx>
> Sent: Friday, March 23, 2001 1:11 PM
> Subject: More PREV Stuff
>
>
> > Just when I thought that I was beginning to figure out Metastock formula
> > language, the following was listed in Apr 01 TASC Traders' Tips as the
> > solution to Ehler's nonlinear filter article. The first one is easy to
> > figure out from the article.
> >
> > {Ehlers Filters}
> > ti:=15;
> > pr:=MP();
> > coef:=Abs(pr-Ref(pr,-5));
> > Sum(coef*pr,ti)/Sum(coef,ti)
> >
> >
> > This one works, but has me stumped as to how it works according to the
> > article. You really have to read the article to understand what is being
> > calculated here.
> >
> > {Distant Coefficient Ehlers Filter}
> > ti:=15;
> > pr:=MP();
> > coef:=Sum(Power(Ref(LastValue(pr+PREV-PREV)-pr,-1),2),ti);
> > Sum(coef*pr,ti)/Sum(coef,ti)
> >
> > The two PREV would appear to be just adding a number and then
subtracting
> a
> > number, leaving "pr" but that isn't the case. The formulas were written
by
> > Cheryl Abram of Equis. It would be nice if someone at Equis would
consider
> > having her give a us a quick class on how this works and other formula
> > construction tips.
> >
> > I came up with:
> >
> > ti:=15;
> > pr:=MP();
> > coef:=Sum(Power(LastValue(pr)-Ref(pr,-1),2),ti);
> > Sum(coef*pr,ti)/Sum(coef,ti)
> >
> > This works too, but doesn't follow rapid price changes as quickly as
> > Cheryl's formula.
> >
> > Any ideas on how the two PREV act together?
> >
> > -Corey
> >
> >
> >
> >
>
>