def testADXR(self): barDs = self.__loadBarDS() self.assertTrue(compare(indicator.ADXR(barDs, 252, 14)[40], 19.8666)) self.assertTrue(compare(indicator.ADXR(barDs, 252, 14)[41], 18.9092)) self.assertTrue(compare(indicator.ADXR(barDs, 252, 14)[-2], 21.5972)) self.assertTrue(compare(indicator.ADXR(barDs, 252, 14)[-1], 20.4920))
def testADXR(self): barDs = self.__loadBarDS() self.assertAmountsAreEqual(indicator.ADXR(barDs, 252, 14)[40], 19.8666) self.assertAmountsAreEqual(indicator.ADXR(barDs, 252, 14)[41], 18.9092) self.assertAmountsAreEqual(indicator.ADXR(barDs, 252, 14)[-2], 21.5972) self.assertAmountsAreEqual(indicator.ADXR(barDs, 252, 14)[-1], 20.4920)