Skip to content

Documentation / @finchart/indicators / RecursiveFold

Interface: RecursiveFold ​

Defined in: indicators/src/kernels.ts:133

A recursive kernel that folds one step at a time — ema and rma differ by only one recurrence line, and they share a single stateful for the seed/gap rule (seed on period consecutive values, a gap before the seed restarts from scratch, a gap after the seed nulls only that position). The state is one value plus seed progress, so a checkpoint is cheap — O(1).

Methods ​

restore() ​

restore(state): void

Defined in: indicators/src/kernels.ts:136

Parameters ​

state ​

RecursiveState

Returns ​

void


snapshot() ​

snapshot(): RecursiveState

Defined in: indicators/src/kernels.ts:135

Returns ​

RecursiveState


step() ​

step(value): number | null

Defined in: indicators/src/kernels.ts:134

Parameters ​

value ​

number | null

Returns ​

number | null