/** * Where a value sits inside a lookback's range: `stoch`, `stochRsi` and * `williamsR`. * * All three are the same test with different sources and different scales. * They are written once, as `position`, so the three cannot drift apart. */ import type { Bar, Series, StateRecord, Tail, Value } from '../values/index.js'; /** * `stoch(len, smoothK, smoothD)`: `[k, d]`, element 0 from bar * `len + smoothK - 2` and element 1 from bar `len + smoothK + smoothD - 3`. * * The close against the lookback's outright high and low, which are the bars' * highs and lows and not the close's own extremes. */ export declare function stochStep(state: StateRecord, key: string, bar: Bar, len: number | null, smoothK: number | null, smoothD: number | null): Value[]; /** `stoch(len, smoothK, smoothD)` as a tail. */ export declare function stochTail(len?: number, smoothK?: number, smoothD?: number): Tail; /** `stoch(len, smoothK, smoothD)` over a run of bars. */ export declare function stoch(bars: readonly Bar[], len?: number, smoothK?: number, smoothD?: number): Value[][]; /** * `stochRsi(src, rsiLen, stochLen, smoothK, smoothD)`: `[k, d]`, element 0 from * bar `rsiLen + stochLen + smoothK - 2`. * * The same position test applied to `rsi` rather than to price, so the lookback * is the range the strength reading itself covered. */ export declare function stochRsiStep(state: StateRecord, key: string, value: Value, rsiLen: number | null, stochLen: number | null, smoothK: number | null, smoothD: number | null): Value[]; /** `stochRsi(src, rsiLen, stochLen, smoothK, smoothD)` as a tail. */ export declare function stochRsiTail(rsiLen?: number, stochLen?: number, smoothK?: number, smoothD?: number): Tail; /** `stochRsi(src, rsiLen, stochLen, smoothK, smoothD)` over a whole series. */ export declare function stochRsi(src: Series, rsiLen?: number, stochLen?: number, smoothK?: number, smoothD?: number): Value[][]; /** * `williamsR(len)`: the same position scaled 0 to -100, from bar `len - 1`. * * Zero at the top of the range and -100 at the bottom, which is the sign * convention the reading has always carried. */ export declare function williamsRStep(state: StateRecord, key: string, bar: Bar, len: number | null): Value; /** `williamsR(len)` as a tail. */ export declare function williamsRTail(len?: number): Tail; /** `williamsR(len)` over a run of bars. */ export declare function williamsR(bars: readonly Bar[], len?: number): Value[]; //# sourceMappingURL=stochastic.d.ts.map