Exemple #1
0
 def testDX(self):
     barDs = self.__loadBarDS()
     self.assertTrue(compare(indicator.DX(barDs, 252, 14)[14], 19.3689))
     self.assertTrue(compare(indicator.DX(barDs, 252, 14)[15], 9.7131))
     self.assertTrue(compare(indicator.DX(barDs, 252, 14)[16], 17.2905))
     self.assertTrue(compare(indicator.DX(barDs, 252, 14)[-2], 10.6731))
     self.assertTrue(compare(indicator.DX(barDs, 252, 14)[-1], 0.4722))
 def testDX(self):
     barDs = self.__loadBarDS()
     self.assertAmountsAreEqual(indicator.DX(barDs, 252, 14)[14], 19.3689)
     self.assertAmountsAreEqual(indicator.DX(barDs, 252, 14)[15], 9.7131)
     self.assertAmountsAreEqual(indicator.DX(barDs, 252, 14)[16], 17.2905)
     self.assertAmountsAreEqual(indicator.DX(barDs, 252, 14)[-2], 10.6731)
     self.assertAmountsAreEqual(indicator.DX(barDs, 252, 14)[-1], 0.4722)