/** * The lookback volume readings: `cmf`, `mfi`, `eom`, `forceIndex` and * `relativeVolume`. * * Each is written once, as a step over a state region, and its tail is that * step over a region of its own. */ import type { Bar, StateRecord, Tail, Value } from '../values/index.js'; /** `cmf(len)`: accumulation over the lookback as a fraction of its volume, from bar `len - 1`. */ export declare function cmfStep(state: StateRecord, key: string, bar: Bar, len: number | null): Value; /** `cmf(len)` as a tail. */ export declare function cmfTail(len?: number): Tail; /** `cmf(len)` over a run of bars. */ export declare function cmf(bars: readonly Bar[], len?: number): Value[]; /** * `mfi(len)`: the strength reading computed on money flow rather than price, * from bar `len`. * * A bar's whole flow counts on one side or the other, by whether the typical * price rose or fell, so the first lookback is bars 1 to `len` and the extra bar * is in the declared warmup. */ export declare function mfiStep(state: StateRecord, key: string, bar: Bar, len: number | null): Value; /** `mfi(len)` as a tail. */ export declare function mfiTail(len?: number): Tail; /** `mfi(len)` over a run of bars. */ export declare function mfi(bars: readonly Bar[], len?: number): Value[]; /** * `eom(len)`: how far price moved per unit of volume, from bar `len`. * * The midpoint's move, times the bar's range, over the volume traded, then * averaged over the lookback. The midpoint move needs the previous bar, so the * average's lookback starts at bar 1 and the first reading is at bar `len`. * * **No scaling constant.** Implementations of this reading usually multiply by * a large divisor whose only job is to bring the number into a readable range, * and they do not agree on it. `stdlib.md` section 7 declares `eom(len = 14)` * with no such argument, so there is none here and the reading is the quantity * itself. That leaves it very small on a liquid instrument, which is recorded * as a gap in the specification rather than papered over with a constant this * library invented. */ export declare function eomStep(state: StateRecord, key: string, bar: Bar, len: number | null): Value; /** `eom(len)` as a tail. */ export declare function eomTail(len?: number): Tail; /** `eom(len)` over a run of bars. */ export declare function eom(bars: readonly Bar[], len?: number): Value[]; /** `forceIndex(len)`: change times volume, smoothed, from bar `len`. */ export declare function forceIndexStep(state: StateRecord, key: string, bar: Bar, len: number | null): Value; /** `forceIndex(len)` as a tail. */ export declare function forceIndexTail(len?: number): Tail; /** `forceIndex(len)` over a run of bars. */ export declare function forceIndex(bars: readonly Bar[], len?: number): Value[]; /** `relativeVolume(len)`: this bar's volume over its own recent average, from bar `len - 1`. */ export declare function relativeVolumeStep(state: StateRecord, key: string, volume: Value, len: number | null): Value; /** `relativeVolume(len)` as a tail. */ export declare function relativeVolumeTail(len?: number): Tail; /** `relativeVolume(len)` over a run of bars. */ export declare function relativeVolume(bars: readonly Bar[], len?: number): Value[]; //# sourceMappingURL=flow.d.ts.map