/** * Machine Learning: kNN-based Strategy * * k-Nearest Neighbors classification using RSI and CCI as dual features. * For each bar, computes Euclidean distance to all historical feature pairs, * finds k-nearest neighbors, and takes majority vote on price direction. * * Reference: TradingView "Machine Learning: kNN-based Strategy" (TV#413) */ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs'; import type { MarkerData } from '../types'; export interface MlKnnStrategyInputs { k: number; rsiLen: number; cciLen: number; lookback: number; src: SourceType; } export declare const defaultInputs: MlKnnStrategyInputs; 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 & { markers: MarkerData[]; }; export declare const MlKnnStrategy: { calculate: typeof calculate; metadata: { title: string; shortTitle: string; overlay: boolean; }; defaultInputs: MlKnnStrategyInputs; inputConfig: InputConfig[]; plotConfig: PlotConfig[]; }; //# sourceMappingURL=ml-knn-strategy.d.ts.map