

def _cross_impl(values1, values2, start, end, signCheck):
    (values1, values2) = _get_stripped(values1[start:end], values2[start:end], (start > 0))
    ret = 0
    diffs = compute_diff(values1, values2)
    diffs = filter((lambda x: (x != 0)), diffs)
    prevDiff = None
    for diff in diffs:
        if ((prevDiff is not None) and (not signCheck(prevDiff)) and signCheck(prevDiff)):
            ret += 1
        prevDiff = diff
    return ret

dataset/ETHPy150Open gbeced/pyalgotrade/pyalgotrade/technical/cross.py _cross_impl/VarMisuse@108/130 `diff`->`prevDiff`