UNPKG

chart-0714

Version:

Professional trading chart library with advanced customization for trading journal apps

91 lines (90 loc) 2.42 kB
import { Chart } from '../Chart'; import { IndicatorConfig } from '../../plugins/IndicatorPlugin'; import { Timeframe } from '../../utils/timeframeDetector'; /** * 인디케이터 관련 헬퍼 클래스 */ export declare class ChartIndicatorHelper { private chart; private timeframeMAIds; constructor(chart: Chart); /** * 개별 SMA 추가 (간편 메서드) */ addSMA(period: number, options?: { color?: string; lineWidth?: number; source?: 'open' | 'high' | 'low' | 'close'; }): string; /** * 개별 EMA 추가 (간편 메서드) */ addEMA(period: number, options?: { color?: string; lineWidth?: number; source?: 'open' | 'high' | 'low' | 'close'; }): string; /** * 볼린저 밴드 추가 (간편 메서드) */ addBollingerBands(period?: number, stdDev?: number, options?: { upperColor?: string; lowerColor?: string; middleColor?: string; }): string; /** * 모든 MA 라인 표시/숨김 토글 */ toggleAllMA(): void; /** * 인디케이터 추가 */ addIndicator(config: IndicatorConfig): string; /** * 인디케이터 제거 */ removeIndicator(id: string): void; /** * 인디케이터 업데이트 */ updateIndicator(id: string, updates: Partial<IndicatorConfig>): void; /** * 인디케이터 가져오기 */ getIndicator(id: string): IndicatorConfig | undefined; /** * 모든 인디케이터 가져오기 */ getIndicators(): IndicatorConfig[]; /** * 모든 인디케이터 제거 */ clearIndicators(): void; /** * 인디케이터 토글 */ toggleIndicator(id: string): void; /** * 현재 timeframe에 맞는 이동평균선 세트 적용 */ applyTimeframeMA(customConfigs?: Record<Timeframe, Array<{ type: 'SMA' | 'EMA'; period: number; color: string; }>>): void; /** * timeframe별로 적용된 이동평균선 제거 */ clearTimeframeMA(): void; /** * 특정 timeframe의 이동평균선만 제거 */ clearTimeframeMAByTimeframe(timeframe: Timeframe): void; /** * 현재 적용된 timeframe MA 정보 가져오기 */ getTimeframeMAInfo(): { timeframe: Timeframe | null; indicatorIds: string[]; }; }