Merge pull request #2858 from freqtrade/fix/rolling_max
Fix implementation of rolling_max
This commit is contained in:
commit
f5fb129483
4
freqtrade/vendor/qtpylib/indicators.py
vendored
4
freqtrade/vendor/qtpylib/indicators.py
vendored
@ -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()
|
||||
|
||||
|
||||
# ---------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user