# Kaufmann adaptive moving average

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
redbank199
Posts: 3
Joined: Sep 29 2006
I am interested in plotting Kaufman adaptive moving average
on MultiCharts.

Does any one have the TS code for this moving average ?

piranhaxp
Posts: 241
Joined: Oct 18 2005
Has thanked: 4 times
Been thanked: 30 times
Hi ....

I take this one .... :

KAMA-Indikator
-----------------

Code: Select all

```inputs: Price( Close ), EffRatioLength( 20), FastAvgLength( 3), SlowAvgLength( 30 ); variables: MAA( 0 ) ; MAA = AdaptiveMovAvg( Price, EffRatioLength, FastAvgLength, SlowAvgLength ) ; Plot1( MAA, "MAA" ) ;```
----------------------------

Code: Select all

```inputs: Price( numericseries ), EffRatioLength( numericsimple ), FastAvgLength( numericsimple ), { this input assumed to be a constant >= 1 } SlowAvgLength( numericsimple ) ; { this input assumed to be a constant >= 1 } variables: NetChg( 0 ), TotChg( 0 ), EffRatio( 0 ), ScaledSFSqr( 0 ), SlowAvgSF( 2 / ( SlowAvgLength + 1 ) ), FastAvgSF( 2 / ( FastAvgLength + 1 ) ), SFDiff( FastAvgSF - SlowAvgSF ) ; if CurrentBar = 1 then AdaptiveMovAvg = Price else begin NetChg = AbsValue( Price - Price[ EffRatioLength ] ) ; TotChg = Summation( AbsValue( Price - Price[1] ), EffRatioLength ) ; if TotChg > 0 then EffRatio = NetChg / TotChg else EffRatio = 0 ; ScaledSFSqr = Square( SlowAvgSF + EffRatio * SFDiff ) ; AdaptiveMovAvg = AdaptiveMovAvg[1] + ScaledSFSqr * ( Price - AdaptiveMovAvg[1] ) ; end ;```
Hope this is what you want.

Mike

redbank199
Posts: 3
Joined: Sep 29 2006
Mike,

Thanks.

redbank199
Posts: 3
Joined: Sep 29 2006
Mike,

I just checked the code for Adaptive Moving Average in MultiChart's
PowerLanguage editor. Your code looks like the same as the code
there. So you think the AMA in MultiCharts is the Kaufman AMA ?
I do not have Kaufma's book yet, so I can not verify it. I think it
should be described in Kaufman's book.