mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-09-09 11:28:26 +08:00
BUG #311 psar dmn iloc[-1] fix
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user