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

Re: Zero Lag EMA



PureBytes Links

Trading Reference Links

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-
>