Kaufman Moving Average Adaptive (KAMA)

Everyone wants a short-term, fast trading trend that works without large
losses. That combination does not exist. But it is possible to have fast
trading trends in which one must get in or out of the market quickly, but
these have the distinct disadvantage of being whipsawed by market noise
when the market is volatile in a sideways trending market. During these
periods, the trader is jumping in and out of positions with no profit-making
trend in sight. In an attempt to overcome the problem of noise and still be
able to get closer to the actual change of the trend, Kaufman developed an
indicator that adapts to market movement. This indicator, an adaptive moving
average (AMA), moves very slowly when markets are moving sideways but moves
swiftly when the markets also move swiftly, change directions or break out of
a trading range.
เอกสารเผยแพร่: Move to Pine version 4

จากใจ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ยินดีด้วย! คุณสามารถใช้มันได้ฟรี แต่การใช้โค๊ดนี้ซ้ำเพื่อการเผยเเพร่ อยู่ภายใต้ กฎของเรา คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้กับชาร์ตได้

Donate BTC: 13fXLkhWuGMXRmcvwkG2gaWKcnsiD88bwE


For those that want to use with pinescript v3:

nAMA = 0.0
nAMA := nz(nAMA) + nsmooth * (xPrice - nz(nAMA))
+9 ตอบกลับ
HPotter hexelbyte
@hexelbyte, Thank you. It will very helpful for other.
+4 ตอบกลับ
hadi_saadat hexelbyte
@hexelbyte, I tried to change it but Ive got this error :
Cannot use a mutable variable as an argument of the security function.
any Idea how to overcome?
this is one of the best, thank you potter
+1 ตอบกลับ
Mtrade85 Mtrade85
@Mtrade85, And may I ask, which time frames does KAMA work better, can we use it on daily, weekly periods with confidence too ?
+24 ตอบกลับ
HPotter Mtrade85
@Mtrade85, You are welcome.
+3 ตอบกลับ
Many Thanks !
+1 ตอบกลับ
HPotter Mirandole
You are welcome.
Hi there,

Should the default length be left at 21? What is the significance of the length?

Thanks for this!