

def compute_diff(values1, values2):
    assert (len(values1) == len(values2))
    ret = []
    for i in range(len(values1)):
        v1 = values1[i]
        v2 = values2[i]
        if ((v1 is not None) and (v2 is not None)):
            diff = (v1 - v2)
        else:
            diff = None
        ret.append(diff)
    return ret

dataset/ETHPy150Open gbeced/pyalgotrade/pyalgotrade/technical/cross.py compute_diff/original