PureBytes Links
Trading Reference Links
|
First read the manual and the formula primer.
Next change the formula to:
Kaufman's Adaptive Moving Average II
{ Kaufman AMA indicator }
PriceSeries:=Input("Prices series - 0:O|1:H|2:L|3:C",0,3,3);
Periods:=Input("Periods",1,32767,20);
FEndF:=Input("Fast end factor",0,1,0.666);
SEndF:=Input("Slow end factor",0,1,0.0645);
Pr:=If(PriceSeries=0,OPEN,If(PriceSeries=1,HIGH,
If(PriceSeries=2,LOW,CLOSE)));
Signal:=Abs(Pr-Ref(Pr,-Periods));
Dnoise:=Abs(Pr-Ref(Pr,-1));
Noise:=Sum(Dnoise,Periods);
EffRatio:=If(Noise>0.,Signal/Noise,0.);
FERatio:=FEndF*EffRatio+SEndF*(1-EffRatio);
SmoothF:=Power(FERatio,2);
PKAMA:=Pr*SmoothF+(1-SmoothF)*PREV;
PKAMA;
On input variables the default value will be used for the
exploration so I have changed your to default to 20 periods.
Also corrected the if(,,) so you do not get and error.
Open an exploration, select new.
Name it.
Under Column A enter:
FmlVar("Kaufman's Adaptive Moving Average II","PKAMA")
Under Column B enter:
Close
Under Filter enter for longs:
ColB > ColA
Your done.
Enjoy,
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, aztraderguy <no_reply@xxx>
wrote:
>
> Could someone please show me how this formula could be changed
into an
> exploration to give a value? Let's say with the value of Close
and 20
> day time frame. Thanks
>
> Kaufman's Adaptive Moving Average II
> { Kaufman AMA indicator }
> PriceSeries:=Input("Prices series - 0:O|1:H|2:L|3:C",0,3,3);
> Periods:=Input("Periods",1,32767,10);
> FEndF:=Input("Fast end factor",0,1,0.666);
> SEndF:=Input("Slow end factor",0,1,0.0645);
> Pr:=If(PriceSeries=0,OPEN,If(PriceSeries=1,HIGH,If
> (PriceSeries=2,LOW,CLOSE)));
> Signal:=Abs(Pr-Ref(Pr,-Periods));
> Dnoise:=Abs(Pr-Ref(Pr,-1));
> Noise:=Sum(Dnoise,Periods);
> EffRatio:=If(Noise>0.,Signal/Noise,0.);
> FERatio:=FEndF*EffRatio+SEndF*(1-EffRatio);
> SmoothF:=Power(FERatio,2);
> PKAMA:=Pr*SmoothF+(1-SmoothF)*PREV;
> PKAMA;
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|