TradeZoro
Notifications

Cookbook

Donchian channel

Highest high and lowest low of N bars.

//@zscript 1
indicator("Donchian", overlay=true)
n = input.int(20, "Length", minval=2)
hi = ta.highest(high, n)
lo = ta.lowest(low, n)
p1 = plot(hi, "High", color=color.green)
p2 = plot(lo, "Low", color=color.red)
fill(p1, p2, color.new(color.gray, 94))
50265034504350515060
Sample bars, not market data. Donchian.

How it works

A breakout channel: a close above the top line is a new N-bar high.

Education only. Not financial advice. Examples are teaching samples, not trading results.

Zscript is coming soon

The manual opens when Zscript launches.

Back to home