Kaufman’s Adaptive Moving Average (KAMA) was created by Perry J. Kaufman and presented in 1998 in his book “Trading Systems and Methods, 3rd Edition”. The main advantage of KAMA over other moving averages is that it takes into consideration not only the direction, but also the market volatility. KAMA adjusts its length according to the prevailing market conditions.(source: Wikipedia)
// parameters :
// Period = 10
// FastPeriod = 2
// SlowPeriod = 30
Fastest = 2 / (FastPeriod + 1)
Slowest = 2 / (SlowPeriod + 1)
if barindex < Period+1 then
Kama=close
else
Num = abs(close-close[Period])
Den = summation[Period](abs(close-close[1]))
ER = Num / Den
Alpha = SQUARE(ER *(Fastest - Slowest )+ Slowest)
KAMA = (Alpha * Close) + ((1 -Alpha)* Kama[1])
endif
return kama
You must be logged in to post a comment.
How to use KAMA averages [10 2 30] and [10 5 30] in order to have a screener going long or short? is it possible to implement a screener based on that?
This moving average is the same as the Adaptive Moving Average available in the platform.