Keltner Channels Indicator
Overview
Keltner Channels are volatility-based envelopes set above and below an exponential moving average.
This indicator is similar to Bollinger Bands, which use the standard deviation to set the bands. Instead of using the standard deviation, Keltner Channels use the Average True Range (ATR) to set channel distance. The channels are typically set two Average True Range values above and below the 20-day EMA. The exponential moving average dictates direction and the Average True Range sets channel width. Keltner Channels are a trend following indicator used to identify reversals with channel breakouts and channel direction. Channels can also be used to identify overbought and oversold levels when the trend is flat.
Mathematical description of the indicator please see at: Mathematical Description of Technical Indicators
Illustration below shows how Keltner Channels indicator looks like in AnyStock:
As you can see, indicator consists of three series: Upper Channel, Lower Channel and EMA Line. Below you will find all settings available for Keltner Channels.

Adding indicator
To add any indicator to the chart, you need to use Data Provider with the fields required by the indicator.
When such Data Provider is ready - you can add indicator to the chart.
Preparing Data Provider
Keltner Channels indicator needs Data Provider with High, Low and Close fields.
Sample XML/JSON of Data Provider, which can be used to create Keltner Channels indicator:
In case if you use Data Provider for OHLC or Candlestick XML/JSON looks like that:

Indicator Declaration
As soon as Data Provider is ready you can add an indicator to a chart.
Keltner Channels indicator usually used as an overlay indicator and displayed on the same chart with data series (stock data). So we should declare it in the chart where series is displayed.
XML/JSON for Keltner Channels declaration:
15 | type: "KeltnerChannels" , |
As you can see KeltnerChannels type is set to indicator using type attribute, and data_provider attribute specifies data provider with series and indicator data.
Live sample of the chart with Keltner Channels indicator:
Live Sample: Technical Indicators - Adding Keltner Channels to a Chart
Another Sample shows Keltner Channels indicator with Candlestick series:
Live Sample: Technical Indicators - Adding Keltner Channels to a Candlestick Chart

Indicator parameters
Keltner Channels indicator has several specific parameters - atr_period, multiplier and ema_period. This parameters are set in <keltner_channels_indicator> node, where all settings for Keltner Channels indicator are set.
Sample XML/JSON for setting parameters:
02 | type: "KeltnerChannels" , |
Live sample below shows Keltner Channels(20,2,10):
Live Sample: Technical Indicators - Keltner Channels Parameters

Visualization using Lines
To visualize and tune visualization of technical indicators AnyChart Stock Component uses the same methods as for the data series.
By default upper channel and lower channel are shown as Lines, but you can use almost any of available series types to show it on the chart, for example, Spline or StepLine types.
Keltner Channels indicator settings are contained in <keltner_channels_indicator> node, also in this node you can put <upper_series> , <lower_series> and <ema_series> subnodes - these nodes define how exactly indicator is displayed on the chart. Nodes are identical to <series> node used to describe data series, so you can do with indicator anything you can do with series.
Sample XML/JSON for changing indicator visualization:
01 |
<?xml version="1.0" encoding="UTF-8"?> |
02 |
< stock xmlns = "http://anychart.com/products/stock/schemas/1.9.0/schema.xsd" > |
11 |
< name > <![CDATA[ KELT(20,2,10) ]]> </ name > |
07 | type: "KeltnerChannels" , |
As you can see we changed visualization of upper, lower and ema lines.
Live sample below shows settings described above:
Live Sample: Technical Indicators - Keltner Channels Visualization Using Lines

Visualization using RangeArea, RangeSplineArea or RangeBar
You can use RangeArea, RangeSplineArea or RangeBar area series to display Keltner Channel indicator's upper and lower channels.
To use these types of series, which need two values to be displayed, you have to enable special mode, as shown below:
02 | type: "KeltnerChannels" , |
As you can see use_range_based_series should be set to true to use this type of Keltner Channels visualization. When this flag is set to true you can use <range_based_series> node to set series type and configure it, along with legend, tooltip and so on. Sample series configuration (color, name, type) is shown below:
04 |
< name > <![CDATA[ Keltner Channels(20,2,10) ]]> </ name > |
02 | type: "KeltnerChannels" , |
12 | name: "Keltner Channels(20,2,10)" |
And here is a live sample with Keltner Channels drawn as RangeArea and legend configured accordingly:
Live Sample: Technical Indicators - Keltner Channels Visualization using range based series types

Turning off EMA Line
By default EMA line is displayed in Keltner Channels, if you don't want to show it you need to disable elements, that visualize it.
Sample XML/JSON snippet below shows how to do that:
02 | type: "KeltnerChannels" , |
Live sample below shows Keltner Channels indicator without EMA line:
Live Sample: Technical Indicators - Keltner Channels turning off central line
