PolarSolar

Donchian Fibo Channels

1. Set PRZ level for watching
2. Set period as swing time X 2 (or more)
3. Wait rebound from PRZ or PRZ break (use next if break)
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?
// Created by PolarSolar 09 May 2016
// Updated: none

study(title="Donchian Fibo Channels", shorttitle="DFC", overlay=true)
length = input(20, minval=1)
lo = lowest(length)
hi = highest(length)
range = abs(hi-lo)
prz = input(0.618, title="PRZ level",minval=0.236, maxval=0.886, step=0.001)
d = close[1]>hi-(range*prz)?1:-1
r236 = d>0?hi-(range*0.236):lo+(range*0.236)
r382 = d>0?hi-(range*0.707):lo+(range*0.382)
r500 = avg(hi,lo)// basis
r618 = d>0?hi-(range*0.618):lo+(range*0.618)
r707 = d>0?hi-(range*0.707):lo+(range*0.707)
r786 = d>0?hi-(range*0.786):lo+(range*0.786)
r886 = d>0?hi-(range*0.886):lo+(range*0.886)

plot(lo, color=gray, linewidth=2, title="HIGH")
plot(hi, color=gray, linewidth=2, title="LOW")
plot(r236, color=#BA55D3, title=".236") // violet
plot(r382, color=#4169E1, title=".382") // blue
plot(r500, color=#00BFFF, linewidth=2, title=".500") // light blue
plot(r618, color=#32CD32, title=".618") // green
plot(r707, color=#FFD700, title=".707") // yellow
plot(r786, color=#FF8C00, title=".786") // orange
plot(r886, color=red, title=".886") // red