Donchian Channel
- High
- Low
20 candles
- Upper
- Middle
- Lower
Channel of the highest high and lowest low. Draws a channel around the candles: the highest high of the last candles at the top, the lowest low at the bottom and the value in between in the middle. When the price closes above the channel, it has made a new high for that period, a classic breakout signal. Example: “Price crosses above upper Donchian band” with 20 candles reports a breakout above the high of the last 20 candles.
What it looks like
Section titled “What it looks like”- Price (close of each candle)
- channel from the high and low of the 20 candles before
- middle
- upside breakout
Settings
Section titled “Settings”The settings appear on the right under “Properties” once you click the node on the board. Below each field you find the same explanation as here.
Candles
Section titled “Candles”How many candles the high and low come from. 20 is usual, 55 for longer breakouts.
Current candle
Section titled “Current candle”Whether the candle that just closed counts. For breakout alerts leave it out, otherwise the price can never be above the channel.
- exclude (default): High and low of the candles before. Right for breakouts.
- include: High and low including the current candle, the way most charts draw the channel.
Example
Section titled “Example”A breakout: the price closes above the highest high of the 20 candles before.
How to connect the nodes:
- Candle (High) → Donchian Channel (High)
- Candle (Low) → Donchian Channel (Low)
- Candle (Price) → Compare A/B (A)
- Donchian Channel (Upper) → Compare A/B (B)
- Compare A/B (true/false) → Telegram (Trigger)
On the board it reads: 20 candles
Chain as JSON
To try it, copy it and paste it in the editor under “Import”. Importing creates a new chain.
{ "name": "Example: Donchian Channel", "version": 1, "nodes": [ { "id": "c1", "type": "core.candle", "position": { "x": 40, "y": 40 }, "settings": { "pair": "BTC/USDT", "timeframe": "1h" } }, { "id": "d1", "type": "core.donchian", "position": { "x": 260, "y": 40 }, "settings": {} }, { "id": "k1", "type": "core.compare-ab", "position": { "x": 480, "y": 40 }, "settings": { "operator": "crossesAbove" } }, { "id": "t1", "type": "core.telegram", "position": { "x": 700, "y": 40 }, "settings": {} } ], "edges": [ { "from": "c1.high", "to": "d1.high" }, { "from": "c1.low", "to": "d1.low" }, { "from": "c1.close", "to": "k1.a" }, { "from": "d1.upper", "to": "k1.b" }, { "from": "k1.out", "to": "t1.in" } ]}Inputs and outputs
Section titled “Inputs and outputs”Only matching types connect: number series to number series (round pin), signal to signal (square), message to message (diamond).
| Direction | Pin | Type | Note |
|---|---|---|---|
| Input | High | Number series | required |
| Input | Low | Number series | required |
| Output | Upper | Number series | appears in messages as a price, e.g. “$81,616” |
| Output | Middle | Number series | appears in messages as a price, e.g. “$81,616” |
| Output | Lower | Number series | appears in messages as a price, e.g. “$81,616” |
Good to know
Section titled “Good to know”- In messages the values are called “upper Donchian band”, “Donchian middle”, “lower Donchian band”.
- Warm-up with the default settings: 21 candles (this many extra candles are loaded by the replay before the value is reliable).
- Search also finds it under: donchian, channel, breakout, turtle, high, low, volatility.
Technical details
Section titled “Technical details”Top the highest high, bottom the lowest low of the candles, middle (top + bottom) / 2; shifted by one candle when the current one is excluded. With “include” the same values as TradingView’s built-in Donchian Channels indicator.
- Type in the chain:
core.donchian· Version 1.0.0 · Category keyind - Settings in the chain:
length(Candles),current(Current candle) - Pins in the chain: Input
high,low· Outputupper,middle,lower - Reference tests in the manifest: 1 (with fixed price data: 500 candles of 1h)
- How a node is built
Version 2026.10.21.23 · Changelog