/** * `psar(start, step, max)`: `[sar, direction]`, both from bar 1. * * A stop that accelerates toward price. It sits below price in an uptrend and * above it in a downtrend, moves a fraction of the way to the extreme reached * so far on every bar, and that fraction grows each time a new extreme is set, * up to a ceiling. When price reaches the stop the trend flips and the stop * restarts at the extreme the old trend had reached. * * Seeded from bar 0's range, per `stdlib.md` section 4: the direction at bar 1 * is taken from whether that bar closed above bar 0, and the stop starts at bar * 0's low in an uptrend or its high in a downtrend. * * `direction` is -1 long and 1 short, the same convention `supertrend` uses. * * **What this does not include**, said plainly rather than left to be * discovered: the clamp some published versions apply, which forbids the stop * from entering the previous two bars' range. `stdlib.md` section 20.3 fixes * its absence, so a stop drawn with the clamp is a different function rather * than a different arrangement of this one. * * Everything the algorithm carries between bars is a number or a flag in a * state region, which is what lets an engine advance one bar at a time over the * same step this file's tail folds over a run. */ import type { Bar, StateRecord, Tail, Value } from '../values/index.js'; /** `psar(start, step, max)`. */ export declare function psarStep(state: StateRecord, key: string, bar: Bar, start: number | null, step: number | null, ceiling: number | null): Value[]; /** `psar(start, step, max)` as a tail. */ export declare function psarTail(start?: number, step?: number, ceiling?: number): Tail; /** `psar(start, step, max)` over a run of bars. */ export declare function psar(bars: readonly Bar[], start?: number, step?: number, ceiling?: number): Value[][]; //# sourceMappingURL=psar.d.ts.map