MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Zero Lag EMA by Peter Martin
Re: Lag In Moving Avg

To: "Metastock List" <metastock@xxxxxxxxxxxxx>
Subject: Re: Lag In Moving Avg
From: "Vitaly Larichev" <vitaly-l@xxxxxxxx>
Date: Sat, 10 Feb 2001 19:43:09 -0500
References: 4.2.1.20010210135126.00bf67a0@xxxx
<200102102152.f1ALqsQ78610@xxxxxxxxxxxxxxxxxxxxxxx>
Reply-To: metastock@xxxxxxxxxxxxx
Sender: owner-metastock@xxxxxxxxxxxxx

> Bob Webb is exactly right, and said it very well. It's
> not possible to remove the lag from a moving average.

I concur with it. An improvement still available here is to dynamically change the period in MA; MS syntax doesn't allow it :-( . For instance, considering that the tops are accompanied by high volatility, one can make a formula for MA with the period inversely varying with the volatility, or ,say, ROC for that matter. In fact, the following formula posted on the list is built on this idea, though implicitly:

{From Metastock List of Wed, 03 May 2000 14:07:04 GMT From: "j seed"

<jseed_10@xxxxxxxxxxx>; I changed Close to P}

Zero Lag EMA

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

 

I like it, I use it. To smooth it out further, one may apply it twice with smaller period for the second. But again, you cannot make the lag zero! All said, I was impressed by Jeff's trendline

(http://www.digital-web.net/~haferman/plot.html).

Very good, indeed!

Jeff, can you expand a bit what's it - "non-linear trendline"? If it doesn't sound too nosy, of course :-) .

Cheers, Vitaly

[596]

Peter Martin
alakazam@bigpond.com
Source / From: TOP
http://purebytes.com/archives/metastock/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!