frama
forge.ta.frama(high: ArrayLike,low: ArrayLike,close: ArrayLike,period: int = 14) -> np.ndarrayFractal adaptive average of the close (Ehlers).
Parameters
| Name | Type | Default |
|---|---|---|
| high | ArrayLike | |
| low | ArrayLike | |
| close | ArrayLike | |
| period | int | 14 |
Indicator: Fractal adaptive moving average
period is half the window: the fractal dimension compares the high-low range of the last
period bars and of the period bars before them with the range of all 2 * period.
NaN for the first 2 * period - 1 bars. A missing value leaves the bars whose window touches
it empty; the average then starts again from the previous raw close.
forge.ta.FRAMA(**inputs: Any) -> NoneAverage that follows trends closely and flattens in chop, from the fractal dimension.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| period | int | 14 | 1 to 5000 |
N1 = (highest high - lowest low over the last period bars) / period
N2 = the same over the period bars before those, N3 = the same over all 2 * period bars divided by 2 * period
D = (ln(N1 + N2) - ln(N3)) / ln(2), alpha = exp(-4.6 * (D - 1))
FRAMA[i] = alpha * close[i] + (1 - alpha) * FRAMA[i-1]
The first 2 * period - 1 values are left empty.