BUG #311 psar dmn iloc[-1] fix

This commit is contained in:
Kevin Johnson
2021-06-19 11:54:36 -07:00
parent a047627799
commit bc3c5f917b
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ $ pip install pandas_ta
Latest Version
--------------
Best choice! Version: *0.2.90b*
Best choice! Version: *0.2.91b*
```sh
$ pip install -U git+https://github.com/twopirllc/pandas-ta
```
+1 -1
View File
@@ -20,7 +20,7 @@ def psar(high, low, close=None, af0=None, af=None, max_af=None, offset=None, **k
# Not to be confused with ta.falling()
up = high - high.shift(drift)
dn = low.shift(drift) - low
_dmn = (((dn > up) & (dn > 0)) * dn).apply(zero)[-1]
_dmn = (((dn > up) & (dn > 0)) * dn).apply(zero).iloc[-1]
return _dmn > 0
# Falling if the first NaN -DM is positive
+1 -1
View File
@@ -19,7 +19,7 @@ setup(
"pandas_ta.volatility",
"pandas_ta.volume"
],
version=".".join(("0", "2", "90b")),
version=".".join(("0", "2", "91b")),
description=long_description,
long_description=long_description,
author="Kevin Johnson",