def testNATR(self): barDs = self.__loadBarDS() self.assertTrue(compare(indicator.NATR(barDs, 252, 14)[14], 3.9321)) self.assertTrue(compare(indicator.NATR(barDs, 252, 14)[15], 3.7576)) self.assertTrue(compare(indicator.NATR(barDs, 252, 14)[-1], 3.0229))
def testNATR(self): barDs = self.__loadBarDS() self.assertAmountsAreEqual(indicator.NATR(barDs, 252, 14)[14], 3.9321) self.assertAmountsAreEqual(indicator.NATR(barDs, 252, 14)[15], 3.7576) self.assertAmountsAreEqual(indicator.NATR(barDs, 252, 14)[-1], 3.0229)