Skip to content

Commit

Permalink
ENH update mamode
Browse files Browse the repository at this point in the history
  • Loading branch information
twopirllc committed Jul 25, 2021
1 parent 641a1eb commit 1f9c54e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pandas_ta/momentum/squeeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
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
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions pandas_ta/momentum/squeeze_pro.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
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
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"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",
Expand Down

0 comments on commit 1f9c54e

Please sign in to comment.