/** * Simple Moving Average (SMA) Indicator * * Hand-optimized implementation using oakscriptjs. * Matches TradingView's built-in SMA indicator. */ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs'; /** * SMA indicator input parameters */ export interface SMAInputs { len: number; src: SourceType; offset: number; maType: 'None' | 'SMA' | 'SMA + Bollinger Bands' | 'EMA' | 'SMMA (RMA)' | 'WMA' | 'VWMA'; maLength: number; bbMult: number; } export declare const defaultInputs: SMAInputs; export declare const inputConfig: InputConfig[]; /** * Plot configuration */ export declare const plotConfig: PlotConfig[]; /** * Indicator metadata */ export declare const metadata: { title: string; shortTitle: string; overlay: boolean; }; /** * Calculate SMA indicator * * @param bars - OHLCV bar data * @param inputs - Indicator parameters (optional, uses defaults) * @returns Indicator result with plot data */ export declare function calculate(bars: Bar[], inputs?: Partial): IndicatorResult; /** * SMA indicator module */ export declare const SMA: { calculate: typeof calculate; metadata: { title: string; shortTitle: string; overlay: boolean; }; defaultInputs: SMAInputs; inputConfig: InputConfig[]; plotConfig: PlotConfig[]; }; //# sourceMappingURL=sma.d.ts.map