Skip to content

Commit

Permalink
chore: fix PMAX to work with numpy2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Jan 2, 2025
1 parent 737fb06 commit 242d04c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion technical/indicators/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,11 @@ def PMAX(dataframe, period=10, multiplier=3, length=12, MAtype=1, src=1): # noq
)

# Mark the trend direction up/down
df[pmx] = np.where((df[pm] > 0.00), np.where((df[mavalue] < df[pm]), "down", "up"), np.nan)
df[pmx] = np.where(
df[pm] > 0.00,
np.where(df[mavalue] < df[pm], "down", "up"),
"nan",
)
# Remove basic and final bands from the columns
df.drop(["basic_ub", "basic_lb", "final_ub", "final_lb", mavalue], inplace=True, axis=1)

Expand Down

0 comments on commit 242d04c

Please sign in to comment.