UNPKG

trading-signals

Version:

Technical indicators to run technical analysis with JavaScript / TypeScript.

20 lines (19 loc) 601 B
import { IndicatorSeries } from '../../base/Indicator.js'; import type { HighLow } from '../../base/Candle.type.js'; export type ZigZagConfig = { deviation: number; }; type ZigZagState = { highestExtreme: number | null; isUp: boolean; lastCandleReversedTrend: boolean; lowestExtreme: number | null; }; export declare class ZigZag extends IndicatorSeries<HighLow, ZigZagState> { #private; protected state: ZigZagState; constructor(config: ZigZagConfig); getRequiredInputs(): number; update(candle: HighLow<number>, replace: boolean): number | null; } export {};