/** * `supertrend(factor, atrLen)`: `[line, direction]`, both from bar `atrLen`. * * A trailing band built from average true range, which ratchets in the * direction of the trend and never gives ground: the upper band may only fall * while price stays below it, the lower band may only rise while price stays * above it, and the line flips to the other band when price closes through the * one it was following. * * **The first value is at bar `atrLen`, one bar after `atr` has one.** The band * carry-forward and the flip test both read the previous bar's close and the * previous bar's bands, and on the bar average true range first exists there is * no previous bar of either. That bar seeds the state and reports nothing, * which is what `stdlib.md` section 4 declares. An implementation that reported * it would be reporting a direction chosen by its own seeding rule rather than * by the data. * * `direction` is -1 long and 1 short, the sign of the side the band is * protecting against, and it is a number rather than a bool so that * `direction != direction[1]` reads as the flip test. */ import type { Bar, StateRecord, Tail, Value } from '../values/index.js'; import type { Gap } from '../volatility/index.js'; /** `supertrend(factor, atrLen)`. */ export declare function supertrendStep(state: StateRecord, key: string, gap: Gap, close: Value, factor: number | null, atrLen: number | null): Value[]; /** `supertrend(factor, atrLen)` as a tail. */ export declare function supertrendTail(factor?: number, atrLen?: number): Tail; /** `supertrend(factor, atrLen)` over a run of bars. */ export declare function supertrend(bars: readonly Bar[], factor?: number, atrLen?: number): Value[][]; //# sourceMappingURL=supertrend.d.ts.map