How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Feature Request FAQ Help & Wiki Twitter

# KAMAP percent channel

77 0
show the price position of the KAMA channel and the KAMA channel width
study(title="(KAMAP)", shorttitle="KAMA_channel_P", overlay = false)
Length = input(21, minval=1)
xPrice = close
xvnoise = abs(xPrice - xPrice[1])
nfastend = 0.666
nslowend = 0.0645
nsignal = abs(xPrice - xPrice[Length])
nnoise = sum(xvnoise, Length)
nefratio = iff(nnoise != 0, nsignal / nnoise, 0)
nsmooth = pow(nefratio * (nfastend - nslowend) + nslowend, 2)
nAMA = nz(nAMA[1]) + nsmooth * (xPrice - nz(nAMA[1]))

mult = input(2.0, minval=0.001, maxval=50)
maLen=input(7,title="maLength")

dev = mult * atr(maLen)
upper = nAMA + dev
lower = nAMA - dev
dis=upper-lower
upline=(high-nAMA)/dis
dnline=(low-nAMA)/dis

plot(0, color=teal)
plot(-0.5,color=gray)
plot(0.5,color=gray)
u=plot(upline,color=blue)
d=plot(dnline,color=blue)
fill(u,d,color=blue)

enlarge=input(500,title="rollback enlarge")

trd=dev*enlarge
u1=plot(1,color=red)
trdUp=plot(1-trd,color=red)
fill(u1,trdUp,color=red)

United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia

한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter