parameters: (self, n: int, array: bool = False)
return_statement: return result[-1]
docstring: ROC.
docstring_summary: ROC.
docstring_tokens: ROC .
function: def roc(self, n: int, array: bool = False) -> Union[float, np.ndarray]:
          """
          ROC.
          """
          result = talib.ROC(self.close, n)
          if array:
              return result
          return result[-1]
function_tokens: def roc ( self , n : int , array : bool = False ) -> Union [ float , np . ndarray ] : result = talib . ROC ( self . close , n ) if array : return result return result [ - 1 ]