def testCrossBelowMany(self):
        count = 100
        values1 = [0 for i in range(count)]
        values2 = [-1 if i % 2 == 0 else 1 for i in range(count)]

        # Check first value
        self.assertEqual(cross.cross_below(values1, values2, 0, 0), 0)

        # Check every 2 values.
        period = 2
        for i in range(1, count):
            if i % 2 == 0:
                self.assertEqual(cross.cross_below(values1, values2, i - period + 1, i + 1), 0)
            else:
                self.assertEqual(cross.cross_below(values1, values2, period + 1 - i, i + 1), 1)

        # Check every 4 values.
        period = 4
        for i in range(3, count):
            if i % 2 == 0:
                self.assertEqual(cross.cross_below(values1, values2, i - period + 1, i + 1), 1)
            else:
                self.assertEqual(cross.cross_below(values1, values2, i - period + 1, i + 1), 2)

        # Check for all values.
        self.assertEqual(cross.cross_below(values1, values2, 0, count), count / 2)
dataset/ETHPy150Open gbeced/pyalgotrade/testcases/technical_cross_test.py/TestCase.testCrossBelowMany/swapped operands of `-`