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

[amibroker] Re: Perry Kaufman Adaptive Moving Average



PureBytes Links

Trading Reference Links

  Heres a metastock code if someone would like to convert it.

 

Periods := Input("Time Periods",1,1000,2);
Direction := P - Ref(P,-periods);
Volatility := Sum(Abs(ROC(P,1,$)),periods);
Volatility:=If(Volatility>0,Volatility,0.00001);
ER := Abs(Direction/Volatility);
FastSC := 2/(2 + 1);
SlowSC := 2/(30 + 1);
SSC := ER * (FastSC - SlowSC) + SlowSC;
Constant := Pwr(SSC,2);
AMA := If(Cum(1) = periods +1, Ref(P,-1) + constant * (P - Ref(P,-
1)),PREV + constant * (P - PREV));








--- In amibroker@xxxxxxxxxxxxxxx, "traderix2003" <d.adam@xxxx> wrote:
> Hi,
> has someone the formula for the KAMA (Kaufman´s adaptive moving 
> average)?


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/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/