Donchian channel

donchiantrendForge API 1

Highest high and lowest low of the last N bars, with their midpoint.

Inputs

NameTypeDefaultRange
periodint201 to 5000

Outputs

NameTypeRequiredDescription
uppervalueOptionalcolor theme.accent, style line, width 1
lowervalueOptionalcolor theme.accent, style line, width 1
middlevalueOptionalcolor theme.accent, dash dash, style line, width 1
Warm-up
period - 1 bars (19 at the defaults)
Repaints
No
Parity
TA-Lib

Formula

upper = the highest high of the last period bars

lower = the lowest low of the last period bars

middle = (upper + lower) / 2