DonchianChannelDown
DonchianChannelDown in ProBuilder returns the lower Donchian Channel line, the lowest low over the last N bars. Syntax, formula, examples, and gotchas.
Syntax
DonchianChannelDown[period]Parameters
| Name | Type | Default | Description |
|---|---|---|---|
period | integer | none | Number of past bars used to find the lowest low. 20 is the classic value; shorter windows track price closely, longer windows hold levels further away. |
Formula
DonchianChannelDown = Lowest[period](low)The lower line of the Donchian Channel, equivalent to calling Lowest on the low series.
How it works
The Donchian Channel consists of three lines: the upper line (highest high), the lower line (lowest low), and the center line (their average). DonchianChannelDown computes the lower one by scanning the last period bars and returning the smallest low found.
The output only changes when the composition of the window changes. If a new bar prints a lower low, the line drops immediately. If the old lowest low ages out of the window without being replaced, the line steps up to the next-lowest value. Between those events the line is horizontal, which is why Donchian lines look like staircases rather than curves.
Because it marks the exact price under which the market has not traded during the window, the line functions as objective, parameter-light support. Channel breakout systems in the Turtle tradition sell or exit longs when price breaks this line, and measure volatility by the distance to DonchianChannelUp.
Examples
Example 1, Plotting the lower channel line (Indicator)
// Lowest low of the last 20 bars
lowestLow = DonchianChannelDown[20]
RETURN lowestLowDraws the 20-bar lowest low on the price chart. Price touching the line means the market is printing new 20-bar lows.
Example 2, Full channel display (Indicator)
// All three Donchian lines over a 55-bar window
upper = DonchianChannelUp[55]
lower = DonchianChannelDown[55]
center = DonchianChannelCenter[55]
RETURN upper COLOURED(0,128,0), lower COLOURED(200,0,0), center COLOURED(128,128,128)Renders the complete 55-bar channel, upper line in green, lower line in red, midline in grey. The vertical distance between the outer lines visualizes range width.
Example 3, Short breakout entry (ProBacktest)
// Sell short when price breaks the prior 20-bar low, cover on a 10-bar high
lower = DonchianChannelDown[20]
exitline = DonchianChannelUp[10]
IF NOT ShortOnMarket AND close CROSSES UNDER lower[1] THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
IF ShortOnMarket AND close CROSSES OVER exitline[1] THEN
EXITSHORT AT MARKET
ENDIFA symmetric Donchian breakout: entry on a break of the 20-bar low, exit when price recovers above the 10-bar high. Both levels reference the previous bar to keep them fixed during the current bar.
Interpretation
| Condition | Reading |
|---|---|
| Price breaks below the line | New period-bar low, downside breakout or stop-run. |
| Price bounces off the line | The window's low held, short-term support confirmed. |
| Line flat for many bars | No new lows, the market is basing or trending up. |
| Line stepping down repeatedly | Persistent selling, an established downtrend. |
A narrow gap between DonchianChannelDown and DonchianChannelUp indicates compression and low volatility, conditions that often precede breakouts. A wide gap indicates an extended or volatile market.
Common errors and gotchas
- Breakout condition never true on close. Since the line equals the lowest low including the current bar,
close < DonchianChannelDown[20]can never hold when the current low sets the extreme. Compare against the previous bar's line,DonchianChannelDown[20][1], for breakout logic. - Passing a price argument. The function accepts only the bracketed period. To get the lowest value of another series, use
Lowest[period](series)instead. - Bracket confusion.
DonchianChannelDown[20][1]means the 20-bar channel value one bar ago. Reversing the brackets or merging them into one pair raises a syntax error or changes the meaning. - Insufficient history. During the first
periodbars of data, or after aTIMEFRAMEchange with limited preloaded bars, the window is not fully populated and the line can behave erratically. Give indicators enough bars before trusting the level.
Related instructions
DonchianChannelUp, upper channel line, the highest high of the window.DonchianChannelCenter, midpoint between the upper and lower lines.Lowest, lowest value of any series over N bars, the generalized form.LowestBars, number of bars since the lowest value occurred.Highest, highest value of any series over N bars.KeltnerBandDown, lower Keltner channel line, an ATR-based alternative.BollingerDown, lower Bollinger band, a standard-deviation channel.ChandeKrollStopDown, volatility-based trailing stop level below price.
