Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.plotshape
On this pageSignatureParametersReturnsExample

Drawing / Reference

alerta.plotshape

TradingView-compatible spelling: plotshape, runs without warnings

Plots visual shapes on the chart based on a condition.

alerta.plotshape(series, { shape, location, color, text, size, transp }) → void

Parameters

NameTypeRequiredDefaultDescription
seriesseries boolYes—Where to draw: true, or a price with location.absolute; false/na draws nothing.
optionsobjectNot specified—Styling config (style: "label_up"/"label_down"/"triangle_up", textcolor, transp, etc).

Returns

void

Example

alerta.plotshape
const cross = crossover(sma(close, 10), sma(close, 20))plotshape(cross, { shape: "triangle_up", location: "belowbar", color: "green" })

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.