# forge.ta.roc

```python
forge.ta.roc(source: ArrayLike, period: int = 12, method: str = 'percent') -> np.ndarray
```

Change over ``period`` bars, as a percent, a fraction or a ratio.

``percent`` is 100 * (price - earlier) / earlier, ``fraction`` the same without the 100,
``ratio`` is price / earlier and ``ratio100`` is 100 * price / earlier. ``mt5`` is
MetaTrader 5's 100 * (price - earlier) / price, which divides by the current price. A zero
denominator leaves the bar empty.

Since Forge API 1.

## Class forge.ta.ROC

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

Change over a number of bars as a percent, fraction or ratio.

percent: 100 * (x[i] - x[i-period]) / x[i-period]

fraction: (x[i] - x[i-period]) / x[i-period]

ratio: x[i] / x[i-period]

ratio100: 100 * x[i] / x[i-period]

mt5: 100 * (x[i] - x[i-period]) / x[i], the MetaTrader 5 form

A zero denominator leaves the bar empty.

Since Forge API 1.
