Skip to content

Commit

Permalink
Fix implementation of rolling_max
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Feb 4, 2020
1 parent d457d43 commit a707aeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions freqtrade/vendor/qtpylib/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ def rolling_min(series, window=14, min_periods=None):
def rolling_max(series, window=14, min_periods=None):
min_periods = window if min_periods is None else min_periods
try:
return series.rolling(window=window, min_periods=min_periods).min()
return series.rolling(window=window, min_periods=min_periods).max()
except Exception as e: # noqa: F841
return pd.Series(series).rolling(window=window, min_periods=min_periods).min()
return pd.Series(series).rolling(window=window, min_periods=min_periods).max()


# ---------------------------------------------
Expand Down

0 comments on commit a707aeb

Please sign in to comment.