mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix: percent_change from candle must provide percentage, not ratio
closes #10937
This commit is contained in:
@@ -293,7 +293,9 @@ class PercentChangePairList(IPairList):
|
||||
current_close = pair_candles["close"].iloc[-1]
|
||||
previous_close = pair_candles["close"].shift(self._lookback_period).iloc[-1]
|
||||
pct_change = (
|
||||
((current_close - previous_close) / previous_close) if previous_close > 0 else 0
|
||||
((current_close - previous_close) / previous_close) * 100
|
||||
if previous_close > 0
|
||||
else 0
|
||||
)
|
||||
|
||||
# replace change with a range change sum calculated above
|
||||
|
||||
Reference in New Issue
Block a user