# forge.ta.vidya

```python
forge.ta.vidya(source: ArrayLike, period_cmo: int = 9, period_ema: int = 12) -> np.ndarray
```

Chande's variable index dynamic average.

``alpha = 2 / (period_ema + 1) * |CMO|`` with ``CMO`` the Chande momentum over ``period_cmo``
bars, then ``VIDYA = price * alpha + previous * (1 - alpha)``. NaN for the first
``period_ema + period_cmo - 1`` bars of each unbroken run.

Since Forge API 1.

## Class forge.ta.VIDYA

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

Exponential average that speeds up when momentum is strong.

CMO = (sum of up moves - sum of down moves) / (sum of up moves + sum of down moves) over period_cmo bars

alpha = 2 / (period_ema + 1) * |CMO|

VIDYA[i] = x[i] * alpha + VIDYA[i-1] * (1 - alpha)

After a gap the average starts again.

Since Forge API 1.
