def testPLUS_DM(self): barDs = self.__loadBarDS() self.assertAmountsAreEqual( indicator.PLUS_DM(barDs, 252, 14)[13], 10.28) self.assertAmountsAreEqual( indicator.PLUS_DM(barDs, 252, 14)[-2], 10.317) self.assertAmountsAreEqual( indicator.PLUS_DM(barDs, 252, 14)[-1], 9.59) # Original value 9.58
def testPLUS_DM(self): barDs = self.__loadBarDS() self.assertTrue(compare(indicator.PLUS_DM(barDs, 252, 14)[13], 10.28)) self.assertTrue(compare(indicator.PLUS_DM(barDs, 252, 14)[-2], 10.317)) self.assertTrue(compare(indicator.PLUS_DM(barDs, 252, 14)[-1], 9.59)) # Original value 9.58