Chaikin Accumulation/Distribution line and oscillator.
With the Close Location Value
CLV = ((close - low) - (high - close)) / (high - low):
ADaccumulatesCLV * volumeacross bars (zero-range bars contribute nothing)ADOSC = EMA(CLV * volume, fast) - EMA(CLV * volume, slow)
Bars are maps with at least :high, :low, :close and :volume.
See TAlib for the conventions.
Summary
Functions
The latest value of the Chaikin A/D line.
The Chaikin A/D line for every bar.
The Chaikin A/D oscillator: EMA(flow, fast) - EMA(flow, slow),
defined from index slow - 1 on.
Functions
The latest value of the Chaikin A/D line.
Parameters
- bars: list of bars, oldest first.
Examples
iex> TAlib.Indicators.ChaikinAD.ad([
...> %{high: 11, low: 9, close: 10, volume: 100},
...> %{high: 12, low: 8, close: 11, volume: 200}
...> ])
100.0
The Chaikin A/D line for every bar.
iex> TAlib.Indicators.ChaikinAD.ad_list([
...> %{high: 11, low: 9, close: 10, volume: 100},
...> %{high: 12, low: 8, close: 11, volume: 200}
...> ])
[0.0, 100.0]
@spec adosc([map()], pos_integer(), pos_integer()) :: float() | nil
The Chaikin A/D oscillator: EMA(flow, fast) - EMA(flow, slow),
defined from index slow - 1 on.
Parameters
- bars: list of bars, oldest first.
- fast: fast EMA period, a positive integer (default 3).
- slow: slow EMA period, a positive integer (default 10).
Examples
iex> TAlib.Indicators.ChaikinAD.adosc(
...> [
...> %{high: 11, low: 9, close: 10, volume: 100},
...> %{high: 12, low: 8, close: 11, volume: 200}
...> ],
...> 2,
...> 2
...> )
0.0