made reversal int type

This is consistent with other indicators that return numeric values, rather than boolean.
This commit is contained in:
bizso09
2021-07-04 14:01:17 +02:00
committed by GitHub
parent d67d9a8bcb
commit edfafca7b3
+2 -2
View File
@@ -37,7 +37,7 @@ def psar(high, low, close=None, af0=None, af=None, max_af=None, offset=None, **k
long = Series(npNaN, index=high.index)
short = long.copy()
reversal = Series(False, index=high.index)
reversal = Series(0, index=high.index)
_af = long.copy()
_af.iloc[0:2] = af0
@@ -81,7 +81,7 @@ def psar(high, low, close=None, af0=None, af=None, max_af=None, offset=None, **k
long.iloc[row] = sar
_af.iloc[row] = af
reversal.iloc[row] = reverse
reversal.iloc[row] = int(reverse)
# Offset
if offset != 0: