# forge.ta.fractals

```python
forge.ta.fractals(high: ArrayLike, low: ArrayLike) -> dict[str, np.ndarray]
```

Williams fractals: ``up`` (swing high) and ``down`` (swing low), written two bars late.

A bar is a swing high when its high is above the two bars after it and at least the two bars
before it (MetaTrader 5's own asymmetry); swing lows mirror that. The value sits on the bar that
confirms it, never earlier. NaN on the first 4 bars and wherever the pattern does not hold.

Since Forge API 1.

## Class forge.ta.Fractals

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

Swing highs and lows, shown two bars after they form.

An up fractal is a bar whose high is above the next two highs and at least the two before it. A down fractal mirrors it with the lows.

It is written on the bar that confirms it, two bars after the centre, and drawn back on the centre bar.

Since Forge API 1.
