Skip to content

Commit c406cac

Browse files
committed
Fix williams percent range series
1 parent 0862ca1 commit c406cac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pyindicators/indicators/williams_percent_range.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def willr(
3030
.rolling(window=period, min_periods=1).min()
3131

3232
data[result_column] = (
33-
(data["high_n"] - data[close_column]) /
34-
(data["high_n"] - data["low_n"])
35-
) * -100
33+
(data["high_n"].squeeze() - data[close_column].squeeze()) /
34+
(data["high_n"].squeeze() - data["low_n"].squeeze())
35+
).squeeze() * -100
3636

3737
# Set the first `period` rows to 0 using .iloc
3838
if not data.empty:

0 commit comments

Comments
 (0)