Chaikin Oscillator (CHO)

Overview

Developed by Marc Chaikin, the Chaikin Oscillator measures the momentum of the Accumulation Distribution Line using the MACD formula. This makes it an indicator of an indicator. The Chaikin Oscillator is the difference between the 3-day EMA of the Accumulation Distribution Line and the 10-day EMA of the Accumulation Distribution Line. Like other momentum indicators, this indicator is designed to anticipate directional changes in the Accumulation Distribution Line by measuring the momentum behind the movements. A momentum change is the first step to a trend change. Anticipating trend changes in the Accumulation Distribution Line can help chartists anticipate trend changes in the underlying security. The Chaikin Oscillator generates signals with crosses above/below the zero line or with bullish/bearish divergences.

Mathematical description of the indicator please see at: Mathematical Description of Technical Indicators

to top

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

Chaikin Oscillator indicator needs Data Provider with High, Low, Close and Volume fields.

Sample XML/JSON of Data Provider, which can be used to create Chaikin Oscillator indicator:

XML/JSON Syntax
Plain code
03     <data_provider data_set="dataSet1" id="dpMsft">
04       <fields>
05         <field type="High" column="2" approximation_type="High" />
06         <field type="Low" column="3" approximation_type="Low" />
07         <field type="Close" column="4" approximation_type="Close" />
08         <field type="Volume" column="5" approximation_type="Sum" />
09       </fields>
10     </data_provider>
01{
03    {
04      dataSet: "dataSet1",
05      id: "dpMsft",
06      fields: [
07        {
08          type: "High",
09          column: 2,
10          approximationType: "High"
11        },
12        {
13          type: "Low",
14          column: 3,
15          approximationType: "Low"
16        },
17        {
18          type: "Close",
19          column: 4,
20          approximationType: "Close"
21        },
22        {
23          type: "Volume",
24          column: 5,
25          approximationType: "Sum"
26        }
27      ]
28    }
29  ]
30}

to top

Indicator Declaration

As soon as Data Provider is ready you can add an indicator to a chart.

Chaikin Oscillator indicator is usually shown on the chart below the chart with data (stock data). So we should declare it in another chart. Learn more about charts and layout in Chart Layout article.

XML/JSON for Chaikin Oscillator declaration, note that there are two charts defined - one is used to show the stock data, and another one contains technical indicator:

XML/JSON Syntax
Plain code
01 <?xml version="1.0" encoding="UTF-8"?>
02 <stock xmlns="http://anychart.com/products/stock/schemas/1.9.0/schema.xsd">
03   <settings>
04     <charts>
05       <chart>
06         <series_list>
07           <series type="Line" data_provider="dpMsft" />
08         </series_list>
09       </chart>
10       <chart>
11         <technical_indicators>
12           <technical_indicator type="ChaikinOscillator" data_provider="dpMsft" />
13         </technical_indicators>
14       </chart>
15     </charts>
16   </settings>
17 </stock>
01{
02  settings: {
03    charts: [
04      {
05        seriesList: [
06          {
07            type: "Line",
08            dataProvider: "dpMsft"
09          }
10        ]
11      },
12      {
13        technicalIndicators: [
14          {
15            type: "ChaikinOscillator",
16            dataProvider: "dpMsft"
17          }
18        ]
19      }
20    ]
21  }
22}

After all things mentioned above are done, you can create a chart with Chaikin Oscillator indicator, see basic Live Sample with it below:

Live Sample:  Technical Indicators - Adding Chaikin Oscillator Indicator

to top

Indicator parameters

Chaikin Oscillator has three type-specific parameters - fast and slow periods and MA type. These parameters are set in <chaikin_oscillator_indicator> node, where all settings for Chaikin Oscillator indicator are set.

XML for setting Chaikin Oscillator parameters:

XML/JSON Syntax
Plain code
01 <technical_indicator type="ChaikinOscillator" data_provider="dpMsft">
01{
02  type: "ChaikinOscillator",
03  dataProvider: "dpMsft",
05    slowPeriod: 20,
06    fastPeriod: 6,
07    maType: "SMA"
08  }
09}

As you can see you just need to set fast_period, slow_period and ma_type attributes in <chaikin_oscillator_indicator> node, period attributes accept any integer greater than 1 and the ma_type accepts "EMA" and "SMA" strings.

Live sample below shows smoothed CHO(20,6) with EMA:

Live Sample:  Technical Indicators - Chaikin Oscillator Parameters

to top

Visualization

To visualize and tune visualization of technical indicators AnyChart Stock Component uses the same methods as for the data series.

By default Chaikin Oscillator is shown as series of Line type, but you can use almost any of available series types to show it on the chart - Spline, Area or Stick, for example.

Chaikin Oscillator indicator settings are contained in <chaikin_oscillator_indicator> node, also in this node you can put <series> subnode - this node defines how exactly indicator is displayed on the chart. This node is identical to <series> node used to describe data series, so you can do with indicator anything you can do with series.

Sample XML for changing indicator visualization:

XML/JSON Syntax
Plain code
01 <chart>
03     <technical_indicator type="ChaikinOscillator" data_provider="dpMsft">
04       <chaikin_oscillator_indicator>
05         <series type="Spline" color="#469833">
06           <name><![CDATA[CHO(10,3)]]></name>
07           <line_series thickness="2" />
08         </series>
09       </chaikin_oscillator_indicator>
10     </technical_indicator>
12 </chart>
01{
03    {
04      type: "ChaikinOscillator",
05      dataProvider: "dpMsft",
07        series: {
08          type: "Spline",
09          color: "#469833",
10          name: "CHO(10,3)",
11          lineSeries: {
12            thickness: 2
13          }
14        }
15      }
16    }
17  ]
18}

Live sample below shows settings shown above:

Live Sample:  Technical Indicators - Chaikin Oscillator Visualization Settings

to top