code: def gain_loss_one(prevValue, nextValue):
      change = nextValue - prevValue
      if change < 0:
          gain = 0
          loss = abs(change)
      else:
          gain = change
          loss = 0
      return gain, loss
  
file_path: pyalgotrade/pyalgotrade/technical/rsi.py
imports: from six.moves import xrange
  from pyalgotrade import technical
label_desc: Use image node_id 1 for calling a global function with example usage: gain_loss_one(prevValue, nextValue) and returns: gain,  loss