How it is calculated
The middle line is the EMA of the source over the length, seeded with the simple mean of the first values. The upper and lower lines are the middle plus and minus mult times the ATR over atr_length (Wilder's smoothing of the true range, the catalogue's ATR). All three lines start together on the first bar both averages have a value. Keltner 1960, in the ATR version after Raschke.
Reference: Keltner 1960, ATR version after Raschke (TA-Lib EMA and ATR)
How to read it
A close outside the channel shows a strong move in that direction; in a trend the middle line often acts as support or resistance on pullbacks. When the Bollinger Bands lie inside the Keltner channel, volatility is unusually low, a common definition of a squeeze.
In a strategy
A trend entry when the close breaks above ctx.ind("kc", length=20, mult=2.0).upper, with the middle line as a trailing exit, or a pullback buy near the middle line while the trend is up.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Lengthlength | Whole number | 20 | min 2, max 5000 |
Multipliermult | Number | 2 | min 0.1, max 10 |
ATR lengthatr_length | Whole number | 10 | min 1, max 5000 |
Sourcesource | Price | "close" | close, open, high, low, hl2, hlc3, ohlc4, hlcc4 |
What it draws
| Line | Drawn as |
|---|---|
| Upper | Line |
| Basis | Line |
| Lower | Line |
Used in
No strategy template reads it yet.