trading-signals
Version:
Technical indicators to run technical analysis with JavaScript / TypeScript.
19 lines (18 loc) • 736 B
TypeScript
import type { HighLowClose } from '../../base/Candle.type.js';
import { TechnicalIndicator, TradingSignal } from '../../base/Indicator.js';
export type VolatilityStopResult = {
signal: typeof TradingSignal.BULLISH | typeof TradingSignal.BEARISH;
stop: number;
};
export type VolatilityStopConfig = {
interval?: number;
multiplier?: number;
};
export declare class VolatilityStop extends TechnicalIndicator<VolatilityStopResult, HighLowClose<number>> {
#private;
readonly interval: number;
readonly multiplier: number;
constructor({ interval, multiplier }?: VolatilityStopConfig);
getRequiredInputs(): number;
update(candle: HighLowClose<number>, replace: boolean): VolatilityStopResult | null;
}