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

Re: Zero Lag EMA



PureBytes Links

Trading Reference Links

Del, I think your code should read something like this - and look similar to 
the chart below compared to the Zero Lag SMA non displaced (using the 
close).
Ian

Period:= Input("What Period",1,250,13);
Disp:= Input("Forward Displacement",0,250,8);
SMA1:= Mov(C,Period,S);
SMA2:= Mov(SMA1,Period,S);
Difference:= SMA1 - SMA2;
ZeroLagSMA:= SMA1 + Difference;
Ref(ZeroLagSMA,-Disp)





>From: "Del Rimes" <delrimes@xxxxxxxx>
>Reply-To: metastock@xxxxxxxxxxxxx
>To: <metastock@xxxxxxxxxxxxx>
>Subject: Re: Zero Lag EMA
>Date: Sun, 21 May 2000 07:54:21 -0400
>
>Bob, your message below was apropos. I am trying to create a simple 13
>period moving average with a forward displacement of 8 periods. Borrowing
>from your code, I created the following formula:
>
>Period:= Input("What Period",1,250,13);
>Disp:= Input("Forward Displacement",0,250,8);
>Mov(MP(), Period, S
>
>..but it doesn't displace. It simply gives me the standard MA. Can you
>pinpoint the error(s)?
>
>Much appreciated.
>
>
>----- Original Message -----
>From: "Bob Jagow" <bjagow@xxxxxxx>
>To: <metastock@xxxxxxxxxxxxx>
>Sent: Friday, May 19, 2000 11:49 AM
>Subject: RE: Zero Lag EMA
>
>
> > Hi Sonny,
> >   To displace an indicator forward, you use Ref(myInd,-p).
> >   The median and typical prices are built-in functions -- MP() is(H+L)/2
>and
> > typ() is (H+L+C)/3.
> > For MP, use
> > ----
> > Period:= Input("What Period",1,250,10);
> > Disp:= Input("Forward Displacement",0,250,10);
> > EMA1:= Mov(MP(),Period,E);
> > EMA2:= Mov(EMA1,Period,E);
> > Difference:= EMA1 - EMA2;
> > ZeroLagEMA:= EMA1 + Difference;
> > Ref(ZeroLagEMA,-Disp)
> > ----
> >
> > Bob
> >
> >
> > -----Original Message-----
> > From: owner-metastock@xxxxxxxxxxxxx
> > [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Sonnysark@xxxxxxx
> > Sent: Friday, May 19, 2000 7:17 AM
> > To: metastock@xxxxxxxxxxxxx
> > Subject: Zero Lag EMA
> >
> >
> > The list talked about the use of Zero Lag EMA a couple of weeks ago.  
>The
> > Zero Lag EMA is set so it applies to the closing price only.  Does 
>anyone
> > know how I can adjust the formula so the Zero Lag EMA can be applied to
>the
> > high and low or to get it to displace forward?  Thanks, -Sonny-
> >
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Attachment Converted: "f:\eudora\attach\Zero Lag.gif"