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

[amibroker] Re: ZERO LAG MOVING AVERAGE



PureBytes Links

Trading Reference Links

Or, plot the following (adapted from Dimitris' code), then right click
over the chart pane and select "Parameters" or press Ctrl+R.  Then
slide the bar to change moving average periods and you can see how the
zerolag compares to exponential and simple moving averages.

Mark

T=Param("Period",10,4,60,2);
M = (H+L)/2;// your array here
EMA1 = EMA(M,T);
MA1=MA(M,T);
EMA2 = EMA(EMA1,T);
Diff = EMA1 - EMA2;
ZeroLagEMA = EMA1 + Diff;
GraphXSpace = 2;
Plot(Close,"",1,64);//Candle chart 
Plot(ZeroLagEMA,"Zero Lag",5,1);
Plot(EMA1, "EMA",7,1);
Plot(MA1, "MA",4,1);



--- In amibroker@xxxxxxxxxxxxxxx, "traderix2003" <d.adam@xxxx> wrote:
> Has somebody the formula for a " zero lag EMA"?
> A friend of mine gave me the Metastock formula. Perhaps some one 
> could translate it:
> 
> Zero Lag EMA
> Period:=Input("What Period",1,250,10);
> EMA1=Mov(P,Period,E);
> Difference:=EMA1 - EMA2;
> ZeroLagEMA:=EMA1 + Difference;
> ZeroLagEMA
> 
> Thxs for your help.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/aM1XQD/od7FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/