/** * `adx(diLen, adxLen)`, `aroon(len)` and `ichimoku(convLen, baseLen, spanLen)`: * how strong the trend is, which side owns it, and the five line frame. * * Each is written once, as a step over a state region, and its tail is that * step over a region of its own. An engine calls the same step against the * region it holds for the call site, so there is no second arrangement of the * arithmetic anywhere for the two to drift apart in. */ import type { Bar, StateRecord, Tail, Value } from '../values/index.js'; import type { Gap } from '../volatility/index.js'; /** * `adx(diLen, adxLen)`: `[adx, plusDI, minusDI]`, elements 1 and 2 from bar * `diLen` and element 0 from bar `diLen + adxLen - 1`. * * Directional movement is the part of this bar's range that lies outside the * previous bar's, on whichever side is larger. It needs the bar before it, so * the smoothing's lookback is bars 1 to `diLen` and the first reading is at bar * `diLen`. The true range in the denominator uses the gap-aware form for the * same reason, so all three smoothed quantities cover the same bars: seeding * one of them a bar earlier than the other two would bias every reading after * it while still looking entirely plausible. * * The previous bar's two extremes are held in the region, because they are the * arithmetic's own history. The previous close is not: it arrives with the gap, * for the reason `range.ts` sets out. */ export declare function adxStep(state: StateRecord, key: string, gap: Gap, diLen: number | null, adxLen: number | null): Value[]; /** `adx(diLen, adxLen)` as a tail. */ export declare function adxTail(diLen?: number, adxLen?: number): Tail; /** `adx(diLen, adxLen)` over a run of bars. */ export declare function adx(bars: readonly Bar[], diLen?: number, adxLen?: number): Value[][]; /** * `aroon(len)`: `[up, down]`, both from bar `len`. * * How recently the lookback's high and low were set, as a percentage: 100 when it * was this bar, 0 when it was `len` bars ago. The lookback is `len + 1` bars * wide, because a reading of 0 has to be reachable and an extreme `len` bars * back has to still be inside the lookback for that. That extra bar is where the * declared warmup of bar `len` rather than bar `len - 1` comes from. */ export declare function aroonStep(state: StateRecord, key: string, high: Value, low: Value, len: number | null): Value[]; /** `aroon(len)` as a tail. */ export declare function aroonTail(len?: number): Tail; /** `aroon(len)` over a run of bars. */ export declare function aroon(bars: readonly Bar[], len?: number): Value[][]; /** * `ichimoku(convLen, baseLen, spanLen)`: `[conversion, base, spanA, spanB, * lagging]`, at bars `convLen - 1`, `baseLen - 1`, `baseLen - 1`, * `spanLen - 1` and `baseLen - 1`. * * Each of the first four lines is the midpoint of a lookback's outright high and * low, over a different length. **The spans are returned undisplaced, at the * bar they are computed on**, per `stdlib.md` section 4: a study draws them * forward with the plot's `offset` argument, because a series that has already * been shifted cannot be compared with anything else in the script without * shifting it back. * * The lagging line is this bar's close, and it is drawn backward by the same * plot argument. It is absent until bar `baseLen - 1`, which is the warmup the * specification declares for it, and which is the first bar there is enough * history for the displacement to land on. */ export declare function ichimokuStep(state: StateRecord, key: string, bar: Bar, convLen: number | null, baseLen: number | null, spanLen: number | null): Value[]; /** `ichimoku(convLen, baseLen, spanLen)` as a tail. */ export declare function ichimokuTail(convLen?: number, baseLen?: number, spanLen?: number): Tail; /** `ichimoku(convLen, baseLen, spanLen)` over a run of bars. */ export declare function ichimoku(bars: readonly Bar[], convLen?: number, baseLen?: number, spanLen?: number): Value[][]; //# sourceMappingURL=directional.d.ts.map