Fix typo causing an implicit bug
This commit is contained in:
parent
12c909d8a8
commit
b9b5d749bb
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user