kc_middle
Keltner Channels Middle Line (MA)
kc_middle(source, length, matype="ema")
Parameters
| Name | Type | Description |
|---|---|---|
source |
field | Price field for the middle line (typically close) |
length |
int | Period for the middle line MA |
Formula
KC Middle = MA(source, length)
Examples
kc_mid = kc_middle(close, 20); # EMA-based (default)
kc_mid = kc_middle(close, 20, matype="sma"); # SMA-based
close > kc_mid; # Price above middle line (bullish)
Returns
float
Range
length is bound by matype's MA family: 2-210 ema (default), 2-105 wilder, or 2-400 windowed sma/wma
Notes
EMA is the TradingView-default smoothing; other MA types trade off responsiveness for smoothness
See Also
References
TradingView: part of ta.kc(); middle line uses EMA by default