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