PureBytes Links
Trading Reference Links
|
Hello,
Here it comes:
P = Close;
Periods = Param("Time Periods",10,1,1000,1);
Direction = P - Ref(P,-periods);
Volatility = Sum(abs(P-Ref(P,-1)),periods);
Volatility =IIf(Volatility>0,Volatility,0.00001);
ER = abs(Direction/Volatility);
FastSC = 2/(2 + 1);
SlowSC = 2/(30 + 1);
SSC = ER * (FastSC - SlowSC) + SlowSC;
Constant = SSC^2;
Plot( AMA( P, Constant ), "KAMA", colorRed );
Plot( Close, "Price", colorBlack, styleCandle );
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "amiabilityy" <amiabilityy@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, May 03, 2003 10:27 PM
Subject: [amibroker] Re: Perry Kaufman Adaptive Moving Average
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)?
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/
------------------------ 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/
|