def testT3(self): barDs = self.__loadBarDS() self.assertAmountsAreEqual( indicator.T3(barDs.getCloseDataSeries(), 252, 5, 0.7)[24], 85.73) self.assertAmountsAreEqual( indicator.T3(barDs.getCloseDataSeries(), 252, 5, 0.7)[25], 84.37) self.assertAmountsAreEqual( indicator.T3(barDs.getCloseDataSeries(), 252, 5, 0.7)[-2], 109.03) self.assertAmountsAreEqual( indicator.T3(barDs.getCloseDataSeries(), 252, 5, 0.7)[-1], 108.88)
def testT3(self): barDs = self.__loadBarDS() self.assertTrue( compare( indicator.T3(barDs.getCloseDataSeries(), 252, 5, 0.7)[24], 85.73)) self.assertTrue( compare( indicator.T3(barDs.getCloseDataSeries(), 252, 5, 0.7)[25], 84.37)) self.assertTrue( compare( indicator.T3(barDs.getCloseDataSeries(), 252, 5, 0.7)[-2], 109.03)) self.assertTrue( compare( indicator.T3(barDs.getCloseDataSeries(), 252, 5, 0.7)[-1], 108.88))