def testMINUS_DM(self): barDs = self.__loadBarDS() self.assertTrue( compare(indicator.MINUS_DM(barDs, 252, 14)[13], 12.995, 3)) self.assertTrue(compare(indicator.MINUS_DM(barDs, 252, 14)[-2], 8.33)) self.assertTrue(compare(indicator.MINUS_DM(barDs, 252, 14)[-1], 9.68)) # Original value 9.672
def testMINUS_DM(self): barDs = self.__loadBarDS() self.assertAmountsAreEqual( indicator.MINUS_DM(barDs, 252, 14)[13], 12.995, 3) self.assertAmountsAreEqual( indicator.MINUS_DM(barDs, 252, 14)[-2], 8.33) self.assertAmountsAreEqual( indicator.MINUS_DM(barDs, 252, 14)[-1], 9.68) # Original value 9.672