# `TAlib.Indicators.APO`
[🔗](https://github.com/benyblack/talib/blob/main/lib/indicators/apo.ex#L1)

Absolute Price Oscillator: `EMA(fast) - EMA(slow)`.

See `TAlib` for the conventions: prices are always given in
chronological order, oldest first, and the series is returned aligned
with the input. `nil` is returned when there is not enough data. For
the percentage variant see `TAlib.Indicators.PPO`.

# `apo`

```elixir
@spec apo([number()], pos_integer(), pos_integer()) :: float() | nil
```

Calculate the latest Absolute Price Oscillator value.

## Parameters

  - prices: list of prices, oldest first.
  - fast: fast EMA period, a positive integer (default 12).
  - slow: slow EMA period, a positive integer (default 26).

## Examples

    iex> TAlib.Indicators.APO.apo([1, 2, 3, 4, 5, 6, 7, 8], 2, 4)
    1.0

# `apo_list`

```elixir
@spec apo_list([number()], pos_integer(), pos_integer()) :: [float() | nil]
```

Calculate the full APO series, defined once the slow EMA exists
(index `slow - 1` on).

## Parameters

  - prices: list of prices, oldest first.
  - fast: fast EMA period, a positive integer (default 12).
  - slow: slow EMA period, a positive integer (default 26).

## Examples

    iex> TAlib.Indicators.APO.apo_list([1, 2, 3, 4, 5, 6, 7, 8], 2, 4)
    [nil, nil, nil, 1.0, 1.0, 1.0, 1.0, 1.0]

---

*Consult [api-reference.md](api-reference.md) for complete listing*
