예제 #1
0
 def testMINUS_DM(self):
     barDs = self.__loadBarDS()
     self.assertTrue(
         compare(indicator.MINUS_DM(barDs, 252, 14)[13], 12.995, 3))
     self.assertTrue(compare(indicator.MINUS_DM(barDs, 252, 14)[-2], 8.33))
     self.assertTrue(compare(indicator.MINUS_DM(barDs, 252, 14)[-1],
                             9.68))  # Original value 9.672
예제 #2
0
 def testMINUS_DM(self):
     barDs = self.__loadBarDS()
     self.assertAmountsAreEqual(
         indicator.MINUS_DM(barDs, 252, 14)[13], 12.995, 3)
     self.assertAmountsAreEqual(
         indicator.MINUS_DM(barDs, 252, 14)[-2], 8.33)
     self.assertAmountsAreEqual(
         indicator.MINUS_DM(barDs, 252, 14)[-1],
         9.68)  # Original value 9.672