Indicado.ADI.eval
You're seeing just the function
eval
, go back to Indicado.ADI module for more information.
Specs
eval([adi_data_map(), ...]) :: {:ok, [float(), ...]} | {:error, atom()}
Calculates ADI for the list. The list argument passed to eval function should be list of adi_data_map type spec.
Returns {:ok, adi_ist}
or {:error, reason}
Examples
iex> Indicado.ADI.eval([%{low: 1.0, high: 11.0, close: 10.0, volume: 5.7}, %{low: 2.0, high: 6.0, close: 3.0, volume: 11.5}, %{low: 3.0, high: 7.0, close: 4.0, volume: 2.0}, %{low: 4.0, high: 20.3, close: 18.0, volume: 20.2}])
{:ok, [4.5600000000000005, -1.1899999999999995, -2.1899999999999995, 12.309386503067484]}
iex> Indicado.ADI.eval([%{low: 1.0, high: 4.0, close: 3.0, volume: 2.0}])
{:ok, [0.6666666666666666]}
iex> Indicado.ADI.eval([])
{:error, :not_enough_data}