/** * Pivot Based Trailing Maxima & Minima [LuxAlgo] * * Tracks trailing maximum and minimum levels using pivot detection. * When a pivot high or low is detected, max/min reset to the bar's * high/low at the pivot offset. Between pivots, max ratchets up and * min ratchets down. An average line is plotted between the two. * * Note: Backpainting is disabled (offset = 0) for real-time accuracy. * Bridge lines (Pine's for loop in barstate.islast) are only needed when * backpaint=true to fill the gap in the last `length` bars. Since we use * offset=0, plots already extend to the end — no LineDrawingData needed. * * Reference: TradingView "Pivot Based Trailing Maxima & Minima [LuxAlgo]" by LuxAlgo */ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs'; import type { MarkerData } from '../types'; export interface PivotTrailingMaxMinInputs { length: number; } export declare const defaultInputs: PivotTrailingMaxMinInputs; 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 PivotTrailingMaxMin: { calculate: typeof calculate; metadata: { title: string; shortTitle: string; overlay: boolean; }; defaultInputs: PivotTrailingMaxMinInputs; inputConfig: InputConfig[]; plotConfig: PlotConfig[]; }; //# sourceMappingURL=pivot-trailing-maxmin.d.ts.map