# [RS]Donchian Fibonacci Trend Channel V0

235 0
EXPERIMENTAL:
Trend Channel Based on Donchian's
study(title='[RS]Donchian Fibonacci Trend Channel V0', overlay=true)
smooth = input(1)
src = ema(input(hl2), smooth)
length = input(10)

f_dcama(_src, _length, _range_multiplier)=>
_h = na(_h[1]) ? highest(_src, _length) : valuewhen(_src >= highest(_src, _length), _src, 0)
_l = na(_l[1]) ? lowest(_src, _length) : valuewhen(_src <= lowest(_src, _length), _src, 0)
_avg = na(_avg[1]) ? _src : avg(_h, _l) + ((_h-_l)*_range_multiplier)

midline = f_dcama(src, length, 0)

u0236 = f_dcama(src, length, 0.118)
u0382 = f_dcama(src, length, 0.264)
u0500 = f_dcama(src, length, 0.500)
l0236 = f_dcama(src, length, -0.118)
l0382 = f_dcama(src, length, -0.264)
l0500 = f_dcama(src, length, -0.500)

plot(midline, color=change(midline)!=0 ? na : black, linewidth=2)
plot(midline, style=circles, color=change(midline)!=0 ? change(midline)<0 ? red : lime : na, linewidth=2, join=true)
plot(u0236, color=change(u0236)!=0?na:navy, linewidth=2)
plot(u0382, color=change(u0382)!=0?na:blue, linewidth=1)
plot(u0500, color=change(u0500)!=0?na:silver, linewidth=2)
plot(l0236, color=change(l0236)!=0?na:navy, linewidth=2)
plot(l0382, color=change(l0382)!=0?na:blue, linewidth=1)
plot(l0500, color=change(l0500)!=0?na:silver, linewidth=2)

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