From b9b5d749bb36cfb8820756e3b4d3bb35534eab56 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 12 Mar 2022 08:58:54 +0100 Subject: [PATCH] Fix typo causing an implicit bug --- freqtrade/strategy/interface.py | 2 +- tests/strategy/test_interface.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 12ec06483..bec89131b 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -760,7 +760,7 @@ class IStrategy(ABC, HyperStrategyMixin): enter_long = latest[SignalType.ENTER_LONG.value] == 1 exit_long = latest.get(SignalType.EXIT_LONG.value, 0) == 1 - enter_short = latest.get(SignalType.ENTER_SHORT.value, 0 == 1) + enter_short = latest.get(SignalType.ENTER_SHORT.value, 0) == 1 exit_short = latest.get(SignalType.EXIT_SHORT.value, 0) == 1 enter_signal: Optional[SignalDirection] = None diff --git a/tests/strategy/test_interface.py b/tests/strategy/test_interface.py index 367818215..4a01b7dec 100644 --- a/tests/strategy/test_interface.py +++ b/tests/strategy/test_interface.py @@ -79,8 +79,7 @@ def test_returns_latest_signal(ohlcv_history): _STRATEGY.config['trading_mode'] = 'futures' # Short signal get's ignored as can_short is not set. - assert _STRATEGY.get_entry_signal( - 'ETH/BTC', '5m', mocked_history) == (None, None) + assert _STRATEGY.get_entry_signal('ETH/BTC', '5m', mocked_history) == (None, None) _STRATEGY.can_short = True