Пример #1
0
 def testHT_TRENDLINE(self):
     ds = self.__loadMedPriceDS()
     self.assertTrue(compare(indicator.HT_TRENDLINE(ds, 252)[63], 88.257))
     self.assertTrue(compare(indicator.HT_TRENDLINE(ds, 252)[-3], 109.69))
     self.assertTrue(compare(indicator.HT_TRENDLINE(ds, 252)[-2], 110.18))
     self.assertTrue(compare(indicator.HT_TRENDLINE(ds, 252)[-1], 110.46))
Пример #2
0
 def testHT_TRENDLINE(self):
     ds = self.__loadMedPriceDS()
     self.assertAmountsAreEqual(indicator.HT_TRENDLINE(ds, 252)[63], 88.257)
     self.assertAmountsAreEqual(indicator.HT_TRENDLINE(ds, 252)[-3], 109.69)
     self.assertAmountsAreEqual(indicator.HT_TRENDLINE(ds, 252)[-2], 110.18)
     self.assertAmountsAreEqual(indicator.HT_TRENDLINE(ds, 252)[-1], 110.46)