Skip to content
EliteChart

Alert

Documentation


Documentation / @elitechart/core / Alert

Defined in: alerts/alert-types.ts:21

Alert state as stored on the chart. Returned by chart.listAlerts().

Example

code
const alerts: ReadonlyArray<Alert> = chart.listAlerts();
for (const a of alerts) if (a.triggered) showBanner(a.id);

Properties

createdAt

code
readonly createdAt: number;

Defined in: alerts/alert-types.ts:27


id

code
readonly id: string;

Defined in: alerts/alert-types.ts:22


note?

code
readonly optional note?: string;

Defined in: alerts/alert-types.ts:24


price

code
readonly price: Price;

Defined in: alerts/alert-types.ts:23


toolDrawingId?

code
readonly optional toolDrawingId?: string;

Defined in: alerts/alert-types.ts:26

Optional association with a drawing (e.g. alert anchored to a trend line).


triggered

code
triggered: boolean;

Defined in: alerts/alert-types.ts:29

True after the alert has fired. Remains true until the alert is removed.