kc_middle
Keltner Channels Middle Line (MA)
kc_middle(source, length, matype="ema")
Parameters
| Name | Type | Description |
|---|---|---|
source |
field | Price field for middle line calculation (typically close) |
length |
int | Period for MA calculation |
matype |
str, optional | Type of moving average for middle line |
Formula
```
middle = MA(source, length, matype)
```
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 value representing the moving average middle line ## References - TradingView: Part of `ta.kc()` return values - Middle line uses EMA by default ## Notes - EMA is the TradingView default for Keltner Channels - Can use other MA types for different smoothing characteristics