/** * A Useful MA Weighting Function (Beta-Weighted MA / BWMA) * * Custom moving average using the Beta distribution's kernel function: * w(i) = x^(alpha-1) * (1-x)^(beta-1) where x = i/(length-1) * The `alpha` parameter controls lag (higher = more lag, smoother). * The `beta` parameter controls negative lag (higher = less lag, more responsive). * The MA is colored by an RSI-based gradient from red (oversold) to green (overbought). * * Reference: TradingView "A Useful MA Weighting Function For Controlling Lag & Smoothness" */ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs'; export interface WeightedMAFunctionInputs { source: SourceType; length: number; beta: number; alpha: number; } export declare const defaultInputs: WeightedMAFunctionInputs; export declare const inputConfig: InputConfig[]; export declare const plotConfig: PlotConfig[]; export declare const metadata: { title: string; shortTitle: string; overlay: boolean; }; export declare function calculate(bars: Bar[], inputs?: Partial): IndicatorResult; export declare const WeightedMAFunction: { calculate: typeof calculate; metadata: { title: string; shortTitle: string; overlay: boolean; }; defaultInputs: WeightedMAFunctionInputs; inputConfig: InputConfig[]; plotConfig: PlotConfig[]; }; //# sourceMappingURL=weighted-ma-function.d.ts.map