UNPKG

trading-signals

Version:

Technical indicators to run technical analysis with JavaScript / TypeScript.

22 lines (21 loc) 702 B
import type { HighLow } from '../../base/Candle.type.js'; import { IndicatorSeries } from '../../base/Indicator.js'; export type PSARConfig = { accelerationStep: number; accelerationMax: number; }; export declare class PSAR extends IndicatorSeries<HighLow<number>> { private readonly accelerationStep; private readonly accelerationMax; private acceleration; private extreme; private lastSar; private isLong; private previousCandle; private prePreviousCandle; constructor(config: PSARConfig); get isStable(): boolean; getRequiredInputs(): number; update(candle: HighLow<number>, replace: boolean): number | null; getResultOrThrow(): number; }