PINE LIBRARY

rate_of_change

178
Library "rate_of_change"

// description: Applies ROC algorithm to any pair of values.
// This library function is used to scale change of value (price, volume) to a percentage value, just as the ROC indicator would do. It is good practice to scale arbitrary ranges to set boundaries when you try to train statistical model.

rateOfChange(value, base, hardlimit)
  This function is a helper to scale a value change to its percentage value.
  Parameters:
    value (float)
    base (float)
    hardlimit (int)
  Returns: per: A float comprised between 0 and 100

免責聲明

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