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

Re: [amibroker] Re: Perry Kaufman Adaptive Moving Average



PureBytes Links

Trading Reference Links

Hello,

No, AMA is ideally suited for all kinds of adaptive moving averages
and replaces PREV is such cases perfectly.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "amiabilityy" <amiabilityy@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, May 03, 2003 10:48 PM
Subject: [amibroker] Re: Perry Kaufman Adaptive Moving Average


  TJ that was quick, i thought it would need the use of a loop to
replace  the PREV function.

  Peter.

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
wrote:
> 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@xxxx>
> 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@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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/



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 Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.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/