PSAR fix to fit TV

This commit is contained in:
Abyss Alora
2022-06-06 08:21:56 +02:00
parent 6596651f33
commit 227a42b36b
+5 -1
View File
@@ -96,7 +96,11 @@ def psar(
_sar = min(low.iloc[row - 1], low.iloc[row - 2], _sar)
if reverse:
_sar = ep
if falling:
_sar = min(low.iloc[row - 1], low.iloc[row - 2], ep)
else:
_sar = max(high.iloc[row - 1], high.iloc[row - 2], ep)
af = af0
falling = not falling # Must come before next line
ep = low_ if falling else high_