From edfafca7b370105568e48fb48cfb3ee412660f2a Mon Sep 17 00:00:00 2001 From: bizso09 Date: Sun, 4 Jul 2021 14:01:17 +0200 Subject: [PATCH] made reversal int type This is consistent with other indicators that return numeric values, rather than boolean. --- pandas_ta/trend/psar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas_ta/trend/psar.py b/pandas_ta/trend/psar.py index 5ef278e..a3fc9c6 100644 --- a/pandas_ta/trend/psar.py +++ b/pandas_ta/trend/psar.py @@ -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: