PINE LIBRARY

supertrend_lib

160
Library "supertrend_lib"

calculate(length, factor)
  Calculates Supertrend values
  Parameters:
    length (simple int): ATR Length
    factor (simple float): ATR Multiplier/Factor
  Returns: [supertrendLine, direction] where direction is 1 for bullish, -1 for bearish

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.