Esempio n. 1
0
 def testCCI(self):
     barDs = self.__loadBarDS()
     self.assertAmountsAreEqual(indicator.CCI(barDs, 252, 2)[1], 66.666)
     self.assertAmountsAreEqual(indicator.CCI(barDs, 252, 5)[4], 18.857)
     self.assertAmountsAreEqual(indicator.CCI(barDs, 252, 11)[10], 87.927)
     self.assertAmountsAreEqual(
         indicator.CCI(barDs, 252, 11)[11], 180.005, 3)
Esempio n. 2
0
 def testCCI(self):
     barDs = self.__loadBarDS()
     self.assertTrue(compare(indicator.CCI(barDs, 252, 2)[1], 66.666))
     self.assertTrue(compare(indicator.CCI(barDs, 252, 5)[4], 18.857))
     self.assertTrue(compare(indicator.CCI(barDs, 252, 11)[10], 87.927))
     self.assertTrue(compare(indicator.CCI(barDs, 252, 11)[11], 180.005, 3))