Learn R Programming

TTR (version 0.13-1)

chaikinOscillator: Chaikin Oscillator

Description

The Chaikin Oscillator is an oscillator applied to the Chaikin Accumulation / Distribution line.

Usage

chaikinOscillator(HLC, volume, ma.slow = list("EMA", n=10),
                     ma.fast = list("EMA", n=3), percent=FALSE)

Arguments

HLC
Object able to be coerced to a matrix, which contains High-Low-Close prices.
volume
Vector or matrix of volume observations corresponding to the HLC object.
ma.slow
A list whose first component is a string containing the slow moving average function name; additional parameters may also be specified as named components.
ma.fast
A list whose first component is a string containing the fast moving average function name; additional parameters may also be specified as named components.
percent
logical; if TRUE, the percentage difference between the slow and fast moving averages is returned, otherwise the difference between the respective averages is returned.

Value

  • A vector containing the Chaikin Oscillator values.

Details

The Chaikin Oscillator is calculated similarly to other price oscillators: by subtracting a slow moving average of the A/D line from a fast moving average of the A/D line.

References

The following site(s) were used to code/document this indicator: http://www.fmlabs.com/reference/ChaikinOscillator.htm http://www.equis.com/Customer/Resources/TAAZ/?c=3&p=41 http://stockcharts.com/education/IndicatorAnalysis/indic_ChaikinOscillator.html

See Also

See EMA, SMA, etc. for moving average options; and note Warning section. Also see CLV, chaikinAD, and oscillator.

Examples

Run this code
data(ttrc)
  oscillator <- chaikinOscillator(ttrc[,c("High","Low","Close")], ttrc[,"Volume"])

Run the code above in your browser using DataLab