Exemplo n.º 1
0
 def testADX(self):
     barDs = self.__loadBarDS()
     self.assertTrue(compare(indicator.ADX(barDs, 252, 14)[27], 23.0000))
     self.assertTrue(compare(indicator.ADX(barDs, 252, 14)[28], 22.0802))
     self.assertTrue(compare(indicator.ADX(barDs, 252, 14)[-2], 16.6840))
     self.assertTrue(compare(indicator.ADX(barDs, 252, 14)[-1], 15.5260))
Exemplo n.º 2
0
 def testADX(self):
     barDs = self.__loadBarDS()
     self.assertAmountsAreEqual(indicator.ADX(barDs, 252, 14)[27], 23.0000)
     self.assertAmountsAreEqual(indicator.ADX(barDs, 252, 14)[28], 22.0802)
     self.assertAmountsAreEqual(indicator.ADX(barDs, 252, 14)[-2], 16.6840)
     self.assertAmountsAreEqual(indicator.ADX(barDs, 252, 14)[-1], 15.5260)