talib.dc
Donchian channel over length bars.
length is the only argument. The channel is taken from the chart’s own bars rather than from a series you supply.
talib.dc(series int length) → [series float, series float, series float]| Parameter | Type | Required | Description |
|---|---|---|---|
length | series int | yes | How many bars the channel spans. |
Returns [series float, series float, series float] — Three series float values as a tuple, in the order middle, upper, lower.
indicator("Donchian channel")
[middle, upper, lower] = talib.dc(20)
plot(middle, title = "Middle")
plot(upper, title = "Upper")
plot(lower, title = "Lower")See also talib.alma · talib.atr · talib.barssince
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.