Fix typo causing an implicit bug

This commit is contained in:
Matthias 2022-03-12 08:58:54 +01:00
parent 12c909d8a8
commit b9b5d749bb
2 changed files with 2 additions and 3 deletions

View File

@ -760,7 +760,7 @@ class IStrategy(ABC, HyperStrategyMixin):
enter_long = latest[SignalType.ENTER_LONG.value] == 1 enter_long = latest[SignalType.ENTER_LONG.value] == 1
exit_long = latest.get(SignalType.EXIT_LONG.value, 0) == 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 exit_short = latest.get(SignalType.EXIT_SHORT.value, 0) == 1
enter_signal: Optional[SignalDirection] = None enter_signal: Optional[SignalDirection] = None

View File

@ -79,8 +79,7 @@ def test_returns_latest_signal(ohlcv_history):
_STRATEGY.config['trading_mode'] = 'futures' _STRATEGY.config['trading_mode'] = 'futures'
# Short signal get's ignored as can_short is not set. # Short signal get's ignored as can_short is not set.
assert _STRATEGY.get_entry_signal( assert _STRATEGY.get_entry_signal('ETH/BTC', '5m', mocked_history) == (None, None)
'ETH/BTC', '5m', mocked_history) == (None, None)
_STRATEGY.can_short = True _STRATEGY.can_short = True