PINE LIBRARY

rate_of_change

111
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

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.