Interface IndicatorAlertSpec

A condition the runtime watches, declared by the descriptor rather than wired up by the host: the indicator is the only thing that knows what a crossover of its own columns means.

Evaluated once per bar, for bars that are new since the last evaluation, so adding the indicator to a loaded chart fires nothing for history.

interface IndicatorAlertSpec {
    id: string;
    message?: string;
    title: string;
    when(ctx: IndicatorAlertContext): boolean;
}

Properties

Methods

Properties

id: string

Stable within the descriptor, e.g. 'cross-up'.

message?: string

Longer text for a notification; defaults to title.

title: string

Short human label, e.g. 'MACD crossed up'.

Methods