Skip to content

Plot, alert and label

Recording values and decisions for inspection.

Start with the topic guide for worked examples. Signatures below show the available arguments.

alert(message: str, level: str = info) -> None

Record a message with level='info', 'warn' or 'error'; any other level raises ValueError. Notification delivery depends on the consuming platform and configured integration.

label(text: str, price: Optional[float] = None) -> None

Record text for the current bar, optionally at a numeric price. Without a price, placement is left to the renderer. A label records a decision/observation, not a confirmed fill.

plot(name: str, value: float) -> None

Record a stable name and numeric current value at bar time. For a series indicator, pass its current value, not the series object. Chart rendering depends on the consuming application.