[RS]Kaufman Adaptive Moving Average V0

Request for coondawg71.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="[RS]Kaufman Adaptive Moving Average", shorttitle="[RS]KAMA.V0", overlay=true)
length0 = input(4)
src0 = input(close)
//  ||----------------------------------------------------------------------------------------------------------------------------||
//  ||---    Kaufman Adaptive Moving Average Function:   -------------------------------------------------------------------------||
kama(src, length)=>
    _ER = abs(change(src, length) / sum(abs(src-src[1]), length))
    _alpha = pow((_ER * 0.6015 + 0.0645), 2)
    _previous = nz(_return[1], src)
    _return = (_alpha * src) + (1-_alpha) * _previous
//  ||----------------------------------------------------------------------------------------------------------------------------||
plot(kama(src0, length0))
Thank you kind Sir!
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out