Price Transform functions (TA-Lib group).
Bars are maps with at least :high, :low and :close (:open for
avgprice/1); extra keys are ignored. Transforms are per-bar and
defined for every bar. See TAlib for the conventions.
Summary
Functions
Average Price: (open + high + low + close) / 4.
The Average Price of every bar.
Median Price: (high + low) / 2.
The Median Price of every bar.
Typical Price: (high + low + close) / 3.
The Typical Price of every bar.
Weighted Close Price: (high + low + 2 * close) / 4.
The Weighted Close Price of every bar.
Functions
Average Price: (open + high + low + close) / 4.
Examples
iex> TAlib.Indicators.PriceTransform.avgprice(%{open: 10, high: 12, low: 8, close: 11})
10.25
The Average Price of every bar.
Median Price: (high + low) / 2.
Examples
iex> TAlib.Indicators.PriceTransform.medprice(%{high: 12, low: 8})
10.0
The Median Price of every bar.
Typical Price: (high + low + close) / 3.
Examples
iex> TAlib.Indicators.PriceTransform.typprice(%{high: 12, low: 8, close: 11})
10.333333333333334
The Typical Price of every bar.
iex> TAlib.Indicators.PriceTransform.typprice_list([
...> %{high: 12, low: 8, close: 10},
...> %{high: 13, low: 9, close: 12}
...> ])
[10.0, 11.333333333333334]
Weighted Close Price: (high + low + 2 * close) / 4.
Examples
iex> TAlib.Indicators.PriceTransform.wclprice(%{high: 12, low: 8, close: 11})
10.5
The Weighted Close Price of every bar.