/** * The readings taken from change rather than from level: `mom`, `roc`, `cmo`, * `trix`, `tsi` and `dpo`. * * Each one's warmup carries the extra bar a change costs, and `stdlib.md` * section 5 states it in the entry rather than leaving it to be derived. */ import type { Series, StateRecord, Tail, Value } from '../values/index.js'; /** `mom(src, len)`: `src - src[len]`, from bar `len`. */ export declare function momTail(len?: number): Tail; /** `mom(src, len)` over a whole series. */ export declare function mom(src: Series, len?: number): Value[]; /** `roc(src, len)`: the same change as a percentage of the older value, from bar `len`. */ export declare function rocStep(state: StateRecord, key: string, value: Value, len: number | null): Value; /** `roc(src, len)` as a tail. */ export declare function rocTail(len?: number): Tail; /** `roc(src, len)` over a whole series. */ export declare function roc(src: Series, len?: number): Value[]; /** * `cmo(src, len)`: up sum less down sum over their total, -100 to 100, from bar * `len`. * * Unsmoothed, which is the whole point of it: the sums are taken over the * lookback outright rather than through an average, so a turn shows on the bar it * happens. */ export declare function cmoStep(state: StateRecord, key: string, value: Value, len: number | null): Value; /** `cmo(src, len)` as a tail. */ export declare function cmoTail(len?: number): Tail; /** `cmo(src, len)` over a whole series. */ export declare function cmo(src: Series, len?: number): Value[]; /** * `trix(src, len)`: the rate of change of a triple exponential mean, from bar * `3 * len - 2`. * * `stdlib.md` section 5 says rate of change, so this is the percentage change * of the smoothed series over one bar. The other reading in circulation takes * the change of the logarithm of the average instead; it is a different number * and it is not what the entry describes. */ export declare function trixStep(state: StateRecord, key: string, value: Value, len: number | null): Value; /** `trix(src, len)` as a tail. */ export declare function trixTail(len?: number): Tail; /** `trix(src, len)` over a whole series. */ export declare function trix(src: Series, len?: number): Value[]; /** * `tsi(src, longLen, shortLen)`: double smoothed momentum, from bar * `longLen + shortLen - 1`. * * The change smoothed twice, over the size of the change smoothed the same way * twice, so the result is a direction rather than a magnitude and the noise * `mom` carries is gone. */ export declare function tsiStep(state: StateRecord, key: string, value: Value, longLen: number | null, shortLen: number | null): Value; /** `tsi(src, longLen, shortLen)` as a tail. */ export declare function tsiTail(longLen?: number, shortLen?: number): Tail; /** `tsi(src, longLen, shortLen)` over a whole series. */ export declare function tsi(src: Series, longLen?: number, shortLen?: number): Value[]; /** * `dpo(src, len)`: price with its displaced mean removed, from bar * `len + floor(len / 2)`. * * The mean is read `floor(len / 2) + 1` bars back rather than at this bar, * which is what "displaced" means here and what the declared warmup requires: * the average's own first value at bar `len - 1`, plus the displacement, is * exactly `len + floor(len / 2)`. Removing an undisplaced mean would be a * different study with a warmup of `len - 1`. */ export declare function dpoStep(state: StateRecord, key: string, value: Value, len: number | null): Value; /** `dpo(src, len)` as a tail. */ export declare function dpoTail(len?: number): Tail; /** `dpo(src, len)` over a whole series. */ export declare function dpo(src: Series, len?: number): Value[]; //# sourceMappingURL=rates.d.ts.map