mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-10-05 13:00:42 +08:00
center of gravity indicator added
This commit is contained in:
1 parent
6349df39a6
commit
c4a2fb99b2
7 files changed
+79
-2
No files matched your search
@@ -84,6 +84,11 @@ class TestMomentum(TestCase):
|
||||
except Exception as ex:
|
||||
error_analysis(result, CORRELATION, ex)
|
||||
|
||||
def test_cg(self):
|
||||
result = pandas_ta.cg(self.close)
|
||||
self.assertIsInstance(result, Series)
|
||||
self.assertEqual(result.name, 'CG_10')
|
||||
|
||||
def test_cmo(self):
|
||||
result = pandas_ta.cmo(self.close)
|
||||
self.assertIsInstance(result, Series)
|
||||
|
||||
@@ -43,6 +43,11 @@ class TestMomentumExtension(TestCase):
|
||||
self.assertIsInstance(self.data, DataFrame)
|
||||
self.assertEqual(self.data.columns[-1], 'CCI_20_0.015')
|
||||
|
||||
def test_cg_ext(self):
|
||||
self.data.ta.cg(append=True)
|
||||
self.assertIsInstance(self.data, DataFrame)
|
||||
self.assertEqual(self.data.columns[-1], 'CG_10')
|
||||
|
||||
def test_cmo_ext(self):
|
||||
self.data.ta.cmo(append=True)
|
||||
self.assertIsInstance(self.data, DataFrame)
|
||||
|
||||
Reference in new issue
Block a user