예제 #1
0
 def testPLUS_DM(self):
     barDs = self.__loadBarDS()
     self.assertAmountsAreEqual(
         indicator.PLUS_DM(barDs, 252, 14)[13], 10.28)
     self.assertAmountsAreEqual(
         indicator.PLUS_DM(barDs, 252, 14)[-2], 10.317)
     self.assertAmountsAreEqual(
         indicator.PLUS_DM(barDs, 252, 14)[-1], 9.59)  # Original value 9.58
예제 #2
0
 def testPLUS_DM(self):
     barDs = self.__loadBarDS()
     self.assertTrue(compare(indicator.PLUS_DM(barDs, 252, 14)[13], 10.28))
     self.assertTrue(compare(indicator.PLUS_DM(barDs, 252, 14)[-2], 10.317))
     self.assertTrue(compare(indicator.PLUS_DM(barDs, 252, 14)[-1],
                             9.59))  # Original value 9.58