/** * Supertrend Indicator * * A trend-following overlay indicator that uses ATR to calculate * dynamic support/resistance levels. * * PineScript display: * upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", style = plot.style_linebr) * downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", style = plot.style_linebr) * bodyMiddle = plot((open + close) / 2, display = display.none) * fill(bodyMiddle, upTrend, color = color.new(color.green, 90), fillgaps = false) * fill(bodyMiddle, downTrend, color = color.new(color.red, 90), fillgaps = false) */ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs'; /** * Supertrend indicator input parameters */ export interface SupertrendInputs { /** ATR period length */ atrPeriod: number; /** ATR multiplier factor */ factor: number; } /** * Default input values matching TradingView defaults */ export declare const defaultInputs: SupertrendInputs; /** * Input configuration for UI */ export declare const inputConfig: InputConfig[]; /** * Plot configuration * plot2 (bodyMiddle) is invisible — used only as a fill anchor */ export declare const plotConfig: PlotConfig[]; /** * Indicator metadata */ export declare const metadata: { title: string; shortTitle: string; overlay: boolean; }; /** * Calculate Supertrend indicator */ export declare function calculate(bars: Bar[], inputs?: Partial): IndicatorResult; /** * Supertrend indicator module */ export declare const Supertrend: { calculate: typeof calculate; metadata: { title: string; shortTitle: string; overlay: boolean; }; defaultInputs: SupertrendInputs; inputConfig: InputConfig[]; plotConfig: PlotConfig[]; }; //# sourceMappingURL=supertrend.d.ts.map