code: def RSI(array, n):
      """Relative strength index"""
      # Approximate; good enough
      gain = pd.Series(array).diff()
      loss = gain.copy()
      gain[gain < 0] = 0
      loss[loss > 0] = 0
      rs = gain.ewm(n).mean() / loss.abs().ewm(n).mean()
      return 100 - 100 / (1 + rs)
  
file_path: backtesting.py/doc/examples/Multiple Time Frames.py
imports: import pandas
  from backtesting import Strategy, Backtest
  from backtesting.lib import resample_apply
  from backtesting.test import GOOG
label_desc: Use image node_id 2 for calling a global function with example usage: RSI(array, n) and returns: unknown