Library "utils"
Few essentials captured together (subset of arrayutils)

timer(timeStart, endTime)
  finds difference between two timestamps
  Parameters:
    timeStart: start timestamp
    endTime: end timestamp
  Returns:

check_overflow(pivots, barArray, dir)
  finds difference between two timestamps
  Parameters:
    pivots: pivots array
    barArray: pivot bar array
    dir: direction for which overflow need to be checked
  Returns: bool overflow

get_trend_series(pivots, length, highLow, trend)
  finds series of pivots in particular trend
  Parameters:
    pivots: pivots array
    length: length for which trend series need to be checked
    highLow: filter pivot high or low
    trend: Uptrend or Downtrend
  Returns: int trendIndexes

get_trend_series(pivots, firstIndex, lastIndex)
  finds series of pivots in particular trend
  Parameters:
    pivots: pivots array
    firstIndex: First index of the series
    lastIndex: Last index of the series
  Returns: int trendIndexes

getConsolidatedLabel(include, labels, separator)
  Consolidates labels into single string by concatenating it with given separator
  Parameters:
    include: array of conditions to include label or not
    labels: string array of labels
    separator: Separator for concatenating labels
  Returns: string labelText

getColors(theme)
  gets array of colors based on theme
  Parameters:
    theme: dark or light theme
  Returns: color themeColors

Pine腳本庫

本著真正的TradingView精神,作者將此Pine代碼以開源腳本庫發布,以便我們社群的其他Pine程式設計師可以重用它。向作者致敬!您可以私下或在其他開源出版物中使用此庫,但在出版物中重用此代碼受網站規則約束。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想使用這個腳本庫嗎?

複製以下行並將其黏貼到您的腳本中。