mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-10-29 13:21:02 +08:00
Add cross_value function
This commit is contained in:
1 parent
91618f1d14
commit
42e45b5e1f
1 file changed
+9
@@ -988,6 +988,15 @@ class AnalysisIndicators(BasePandasObject):
|
||||
self._append(result, **kwargs)
|
||||
return result
|
||||
|
||||
def cross_value(self, a=None, value=None, above=True, asint=True, offset=None, **kwargs):
|
||||
if a is None and value is None: return self._df
|
||||
else:
|
||||
a = self._get_column(a, f"{a}")
|
||||
result = cross(series_a=a, value=value, above=above, asint=asint, offset=offset, **kwargs)
|
||||
self._add_prefix_suffix(result, **kwargs)
|
||||
self._append(result, **kwargs)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
# Volatility Indicators
|
||||
|
||||
Reference in new issue
Block a user