Functions
talib.supertrend()
The Supertrend Indicator. The Supertrend is a trend following indicator.
Syntax
talib.supertrend(series float multiplier, series int atrLength) → [series float, series float]
Arguments
multiplier required series float The multiplier by which the ATR will get multiplied. atrLength required series int Length of ATR. Return Type
[series float, series float] Example
indicator("Supertrend", overlay=true)
atrLength = input(10, "ATR Length")
factor = input(3.0, "Multiplier")
[supertrend, direction] = talib.supertrend(factor, atrLength)
plot(supertrend, color=color.green, title="Supertrend")
bgcolor(direction == 1 ? color.green : color.red)