trading-signals
Version:
Technical indicators to run technical analysis with JavaScript / TypeScript.
22 lines (21 loc) • 774 B
TypeScript
import type { HighLowClose } from '../../base/Candle.type.js';
import { TechnicalIndicator, TradingSignal } from '../../base/Indicator.js';
export type SuperTrendResult = {
supertrend: number;
trend: typeof TradingSignal.BULLISH | typeof TradingSignal.BEARISH;
};
export type SuperTrendConfig = {
interval?: number;
multiplier?: number;
};
export declare class SuperTrend extends TechnicalIndicator<SuperTrendResult, HighLowClose<number>> {
#private;
readonly interval: number;
readonly multiplier: number;
constructor({ interval, multiplier }?: SuperTrendConfig);
getRequiredInputs(): number;
update(candle: HighLowClose<number>, replace: boolean): {
supertrend: number;
trend: "BEARISH" | "BULLISH";
} | null;
}