# forge.ta.atr

```python
forge.ta.atr(high: ArrayLike, low: ArrayLike, close: ArrayLike, period: int = 14, method: str = 'wilder') -> np.ndarray
```

Average true range, Wilder smoothed (``wilder``) or a simple mean (``sma``).

Both start from the true range of bar 1, so the first value is on bar ``period``. After a
missing bar the average restarts with a fresh warm-up.

Since Forge API 1.

## Class forge.ta.ATR

```python
forge.ta.ATR(**inputs: Any) -> None
```

The average true range over a period, Wilder smoothed or simple.

TR[i] = max(high[i], close[i-1]) - min(low[i], close[i-1])

wilder: the first value is the mean of the first period true ranges, then ATR[i] = (ATR[i-1] * (period - 1) + TR[i]) / period

sma: the mean of the last period true ranges

No value until period true ranges exist.

Since Forge API 1.
