ENH update mamode

This commit is contained in:
Kevin Johnson
2021-07-25 13:23:58 -07:00
parent 641a1ebc86
commit 1f9c54e872
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ $ pip install pandas_ta
Latest Version
--------------
Best choice! Version: *0.3.09b*
Best choice! Version: *0.3.10b*
* Includes all fixes and updates between **pypi** and what is covered in this README.
```sh
$ pip install -U git+https://github.com/twopirllc/pandas-ta
+2 -2
View File
@@ -9,7 +9,7 @@ from pandas_ta.utils import get_offset
from pandas_ta.utils import unsigned_differences, verify_series
def squeeze(high, low, close, bb_length=None, bb_std=None, kc_length=None, kc_scalar=None, mom_length=None, mom_smooth=None, use_tr=None, offset=None, **kwargs):
def squeeze(high, low, close, bb_length=None, bb_std=None, kc_length=None, kc_scalar=None, mom_length=None, mom_smooth=None, use_tr=None, mamode=None, offset=None, **kwargs):
"""Indicator: Squeeze Momentum (SQZ)"""
# Validate arguments
bb_length = int(bb_length) if bb_length and bb_length > 0 else 20
@@ -30,7 +30,7 @@ def squeeze(high, low, close, bb_length=None, bb_std=None, kc_length=None, kc_sc
asint = kwargs.pop("asint", True)
detailed = kwargs.pop("detailed", False)
lazybear = kwargs.pop("lazybear", False)
mamode = kwargs.pop("mamode", "sma").lower()
mamode = mamode if isinstance(mamode, str) else "sma"
def simplify_columns(df, n=3):
df.columns = df.columns.str.lower()
+2 -2
View File
@@ -9,7 +9,7 @@ from pandas_ta.utils import get_offset
from pandas_ta.utils import unsigned_differences, verify_series
def squeeze_pro(high, low, close, bb_length=None, bb_std=None, kc_length=None, kc_scalar_wide=None, kc_scalar_normal=None, kc_scalar_narrow=None, mom_length=None, mom_smooth=None, use_tr=None, offset=None, **kwargs):
def squeeze_pro(high, low, close, bb_length=None, bb_std=None, kc_length=None, kc_scalar_wide=None, kc_scalar_normal=None, kc_scalar_narrow=None, mom_length=None, mom_smooth=None, use_tr=None, mamode=None, offset=None, **kwargs):
"""Indicator: Squeeze Momentum (SQZ) PRO"""
# Validate arguments
bb_length = int(bb_length) if bb_length and bb_length > 0 else 20
@@ -35,7 +35,7 @@ def squeeze_pro(high, low, close, bb_length=None, bb_std=None, kc_length=None, k
use_tr = kwargs.setdefault("tr", True)
asint = kwargs.pop("asint", True)
detailed = kwargs.pop("detailed", False)
mamode = kwargs.pop("mamode", "sma").lower()
mamode = mamode if isinstance(mamode, str) else "sma"
def simplify_columns(df, n=3):
df.columns = df.columns.str.lower()
+1 -1
View File
@@ -19,7 +19,7 @@ setup(
"pandas_ta.volatility",
"pandas_ta.volume"
],
version=".".join(("0", "3", "09b")),
version=".".join(("0", "3", "10b")),
description=long_description,
long_description=long_description,
author="Kevin Johnson",