コード例 #1
0
ファイル: talib_test.py プロジェクト: 4ever911/DeepPupil
 def testADX(self):
     barDs = self.__loadBarDS()
     self.assertTrue(compare(indicator.ADX(barDs, 252, 14)[27], 23.0000))
     self.assertTrue(compare(indicator.ADX(barDs, 252, 14)[28], 22.0802))
     self.assertTrue(compare(indicator.ADX(barDs, 252, 14)[-2], 16.6840))
     self.assertTrue(compare(indicator.ADX(barDs, 252, 14)[-1], 15.5260))
コード例 #2
0
 def testADX(self):
     barDs = self.__loadBarDS()
     self.assertAmountsAreEqual(indicator.ADX(barDs, 252, 14)[27], 23.0000)
     self.assertAmountsAreEqual(indicator.ADX(barDs, 252, 14)[28], 22.0802)
     self.assertAmountsAreEqual(indicator.ADX(barDs, 252, 14)[-2], 16.6840)
     self.assertAmountsAreEqual(indicator.ADX(barDs, 252, 14)[-1], 15.5260)