def testKAMA(self): barDs = self.__loadBarDS() self.assertAmountsAreEqual( indicator.KAMA(barDs.getCloseDataSeries(), 252, 10)[10], 92.6575) self.assertAmountsAreEqual( indicator.KAMA(barDs.getCloseDataSeries(), 252, 10)[11], 92.7783) self.assertAmountsAreEqual( indicator.KAMA(barDs.getCloseDataSeries(), 252, 10)[-1], 109.294)
def testKAMA(self): barDs = self.__loadBarDS() self.assertTrue( compare( indicator.KAMA(barDs.getCloseDataSeries(), 252, 10)[10], 92.6575)) self.assertTrue( compare( indicator.KAMA(barDs.getCloseDataSeries(), 252, 10)[11], 92.7783)) self.assertTrue( compare( indicator.KAMA(barDs.getCloseDataSeries(), 252, 10)[-1], 109.294))