UNPKG

trading-signals

Version:

Technical indicators to run technical analysis with JavaScript / TypeScript.

16 lines (15 loc) 520 B
import { TechnicalIndicator } from '../../base/Indicator.js'; export type LinearRegressionResult = { prediction: number; slope: number; intercept: number; }; export declare class LinearRegression extends TechnicalIndicator<LinearRegressionResult, number> { #private; readonly prices: number[]; readonly interval: number; constructor(interval: number); getRequiredInputs(): number; update(price: number, replace: boolean): LinearRegressionResult | null; get isStable(): boolean; }