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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
// 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 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
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.