/** * UDF-inspired datafeed contract for trading charts (Stage 2.24). */ export interface SymbolInfo { symbol: string; name: string; description?: string; timezone?: string; session?: string; pricescale?: number; minmov?: number; } export interface Bar { time: number; open: number; high: number; low: number; close: number; volume?: number; } export interface HistoryRequest { symbol: string; resolution: string; from: number; to: number; } export interface SubscribeBarsRequest { symbol: string; resolution: string; onBar: (bar: Bar) => void; } /** * TradingView UDF-style adapter surface. */ export interface DatafeedAdapter { resolveSymbol(symbol: string): Promise; getBars(request: HistoryRequest): Promise; subscribeBars(request: SubscribeBarsRequest): () => void; } /** Convert bars to typed OHLC arrays for velo-plot series. */ export declare function barsToOhlc(bars: Bar[]): { x: Float64Array; open: Float32Array; high: Float32Array; low: Float32Array; close: Float32Array; volume: Float32Array; };