def testTRANGE(self): barDs = self.__loadBarDS() self.assertTrue(compare(indicator.TRANGE(barDs, 252)[1], 3.535, 3)) self.assertTrue(compare(indicator.TRANGE(barDs, 252)[13], 9.685, 3)) self.assertTrue(compare(indicator.TRANGE(barDs, 252)[41], 5.125, 3)) self.assertTrue(compare(indicator.TRANGE(barDs, 252)[-1], 2.88))
def testTRANGE(self): barDs = self.__loadBarDS() self.assertAmountsAreEqual(indicator.TRANGE(barDs, 252)[1], 3.535, 3) self.assertAmountsAreEqual(indicator.TRANGE(barDs, 252)[13], 9.685, 3) self.assertAmountsAreEqual(indicator.TRANGE(barDs, 252)[41], 5.125, 3) self.assertAmountsAreEqual(indicator.TRANGE(barDs, 252)[-1], 2.88)