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

[amibroker] Zero lag EMA



PureBytes Links

Trading Reference Links

Hello,

I've come across this Investor/RT canned formula for a zero lag EMA:

 Exponential Moving Average
   EMA = EMA.1 + (PRICE - EMA.1 ) * K
or
    EMA = K * PRICE + (1 - K) * EMA.1

    where...
       K = 2 / (n + 1)
         n = Period

Zero Lag Exponential Moving Average
("Zero Lag" is an option within the Exponential Moving Average 
indicator)
   EMA = K * ( 2 * PRICE - PRICE.X) + (1 - K) * EMA.1

    where...
       K = 2 / (n + 1)
         n = Period
         x = lag = (n - 1) / 2

Anyone have any idea how that can be written in AFL using the EMA 
function?  Thanks in advance.

Gernot



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Save up to 80% on top-quality inkjet cartridges and get your order fast!
FREE shipping on orders $50 or more to the US & Canada. Shop at Myinks.com!
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/v2G7ND/KfUGAA/ySSFAA/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/