/** * Declared levels into the chart's horizontal levels, and the pane's range. * * A level's price is a channel rather than a constant, so it is evaluated on * every bar and **the level drawn is the one from the last bar executed**. That * is what makes a level that tracks the data possible at all, and the chart * recomputes its levels after every calculation for the same reason, so the two * meet without either giving anything up: the price travels in the values table * like any other column and is read at its last entry. * * A level whose last value is absent is not drawn, which is the rule for an * absent value reaching any drawn surface: a line breaks, a band stops, a level * is not drawn. Returning it at some substituted price would put a line on the * chart that the script did not ask for. * * The colour, the dash and the width are read against the settings the chart * holds at the moment it asks, not against the ones it held when the descriptor * was built, so a level whose colour came from an `input()` follows the dialog. */ import type { CompiledProgram } from '../../core/emit/index.js'; import type { ColumnSpec } from './columns.js'; import type { ChartLevel, ChartLevelContext, ChartSettings } from './contract.js'; export interface LevelsBuild { readonly columns: readonly ColumnSpec[]; levels(ctx: ChartLevelContext): readonly ChartLevel[]; } export declare function buildLevels(program: CompiledProgram): LevelsBuild; /** * The study's own pane range, or nothing when it fixed none. * * It is read per call rather than once, because `range` is one of the fields a * script may write with an `input()`, and a chart asks again whenever the * settings change. */ export declare function buildRange(program: CompiledProgram): (settings: ChartSettings) => { readonly min: number; readonly max: number; } | null; //# sourceMappingURL=levels.d.ts.map