talib.supertrend

Supertrend from a multiplier and an atrLength, calculated on the chart’s own bars. multiplier accepts a float here, so a fractional setting is available — unlike the int multiplier that talib.bb and talib.kc take.

talib.supertrend(series float multiplier, series int atrLength) → [series float, series float]
ParameterTypeRequiredDescription
multiplierseries floatyesThe multiplier applied to the range measure. Int or float.
atrLengthseries intyesLength used for the average true range.

Returns [series float, series float] — Two series float values as a tuple, in the order value, direction. Direction is -1 while the upper band is in force and 1 while the lower band is.

indicator("Supertrend")
[value, direction] = talib.supertrend(3.0, 10)
plot(value, title = "Value")
plot(direction, title = "Direction")

See also talib.alma · talib.atr · talib.barssince

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade