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

Trend / Reference

alerta.ta.supertrend

TradingView-compatible spelling: ta.supertrend, runs without warnings

Returns SuperTrend line and trend direction (+1/-1).

alerta.ta.supertrend(factor, atrLength, high, low, close) → { supertrend, direction }

Parameters

NameTypeRequiredDefaultDescription
factorfloatNo—ATR multiplier (default 3).
atrLengthintNo—ATR length (default 10).
highseriesNo—High series (default chart high).
lowseriesNo—Low series (default chart low).
closeseriesNo—Close series (default chart close).

Returns

{ supertrend, direction }

Example

alerta.ta.supertrend
const [st, dir] = supertrend(3, 10)plot(st)plotshape(crossover(dir, 0), { style: "triangleup", color: 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.