Donchian SAR
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ganeshkrce

//@version=4
//@version=4
study(title="Donchian Channels", shorttitle="DC", overlay=true, resolution="")
length = input(20, minval=1)
lower = lowest(length)
upper = highest(length)
basis = avg(upper, lower)
plot(basis, "Basis", color=#FF6A00)
u = plot(upper, "Upper", color=#0094FF)
l = plot(lower, "Lower", color=#0094FF)
fill(u, l, color=#0094FF, transp=95, title="Background")

//@version=4
//study(title="Parabolic SAR", shorttitle="SAR", overlay=true, resolution="")
start = input(0.02)
increment = input(0.02)
maximum = input(0.2, "Max Value")
out = sar(start, increment, maximum)
plot(out, "ParabolicSAR", style=plot.style_cross, color=#3A6CA8)