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

Re: okay...



PureBytes Links

Trading Reference Links

Jim, This works for me.  Can't remember whether I got it from the Guppy
site or from Equis.

HHP
===================
{NAME: Adaptive Moving Average (Kaufman)}

Periods := Input("Time Periods",1,1000, 20);

Direction := CLOSE - Ref(CLOSE,-periods);

Volatility := Sum(Abs(ROC(CLOSE,1,$)),periods);

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(CLOSE,-1) + constant * (CLOSE -
Ref(CLOSE,-1)),PREV + constant * (CLOSE - PREV));

AMA
==========================

Jim wrote:
> 
> I'll take you up on that offer...i am trying to code Kaufmann AMA and
> having a problem getting it to work..I will send you the code if you
> need it to figure out....
> 
> Jim....Atlanta, ga