CapnOscar

Donchian Channels Mom

678
Donchian Channel Momentum helps to define trends.. Better use with 30 mnts and above timeframes
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study(title="Donchian Channels Mom", shorttitle="DCMom", overlay=false)

len = input(200, minval=1, title="Length")
src = input(close, title="Source")
momi = src - src[len]
smooth = input(10, minval=0, title="Smooth")
mom=ema(momi, smooth)

length = input(100, minval=1)
lower = lowest(mom,length)
upper = highest(mom,length)
basis = avg(upper, lower)
l = plot(lower, color=red)
u = plot(upper, color=red)
plot(basis, color=red, linewidth=3)
plot(mom, color=blue, linewidth=3)
fill(u, l, color=orange, transp=95)