code: 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, i - period + 1, 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
      )
  
file_path: pyalgotrade/testcases/technical_cross_test.py
imports: from .None import common
  from pyalgotrade.technical import cross
  from pyalgotrade.technical import ma
  from pyalgotrade import dataseries
label_desc: Use image node_id 5 for calling the TestCase obj's underlying member method code with example usage: obj.testCrossBelowMany() without return types