← Back to Library
Volatility

Donchian Channels

Donchian Channels are formed by taking the highest high and the lowest low of the last n periods. They are useful for identifying breakout trading signals.

Pine Script V6
//@version=6
indicator('Donchian Channels', overlay=true)
len = input.int(20, 'Length')
plot(ta.highest(len), 'Upper', color=color.orange)
plot(ta.lowest(len), 'Lower', color=color.orange)