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

Re: MA



PureBytes Links

Trading Reference Links

Here is my translation of metastock code into afl.

T = 10; /* MA Time Period */

MP = (H+L)/2;
Typ = (H+L+C)/3;

EMA1 = EMA(MP,T);
EMA2 = EMA(EMA1,T);
Diff = EMA1 - EMA2;

ZeroLagEMA = EMA1 + Diff;
Graph0 = ZeroLagEMA;

the original Metastock code :

Zero Lag EMA

Here's my Metastock 6.2 coded version of the Zero Lag Moving Average, 
as described in the April, 2000, issue of Technical Analysis of 
Stocks and Commodities. I've also used it to construct a Zero Lag 
MACD and a Zero Lag MACD trigger signal.

Period:= Input("What Period",1,250,10);
EMA1:= Mov(CLOSE,Period,E);
EMA2:= Mov(EMA1,Period,E);
Difference:= EMA1 - EMA2;
ZeroLagEMA:= EMA1 + Difference;
ZeroLagEMA



Zero Lag MACD: -- Bonus

EMA1:= Mov(CLOSE,13,E);
EMA2:= Mov(EMA1,13,E);
Difference:= EMA1 - EMA2;
ZeroLagEMA13:= EMA1 + Difference;
EMA1:= Mov(CLOSE,21,E);
EMA2:= Mov(EMA1,21,E);
Difference:= EMA1 - EMA2;
ZeroLagEMA21:= EMA1 + Difference;
ZeroLagMACD:=ZeroLagEMA13 - ZeroLagEMA21;
ZeroLagMACD

There are a lot formulas here as given by someone on this list:

http://www.guppytraders.com/gup98.htm

However , I don't understand all metastock mnemonics such as - fml 
etc. Is there a website that defines these?

Mohan





--- In amibroker@xxxx, b519b@xxxx wrote:
> "use a zero lag MA if you are a Metastock or TradeStation user to 
> eliminate lag [that comes with MAs]."
> 
> Does anyone know what that quotation refers to? Can it be 
programmed 
> in AFL? Perhaps it already has been and is one of the "weighted" 
MAs 
> given by Witold Dabrowski <witold_dabrowski@xxxx> in his recent 
post 
> here. Any guidance would be appreciated.
> 
> b






  • References: