Added is_short=(signal == SignalDirection.SHORT) inside freqtradebot.create_trade

This commit is contained in:
Sam Germain 2021-10-09 16:32:22 -06:00
parent 9513650ffe
commit 94f0be1fa9

View File

@ -453,17 +453,26 @@ class FreqtradeBot(LoggingMixin):
bid_check_dom = self.config.get('bid_strategy', {}).get('check_depth_of_market', {}) bid_check_dom = self.config.get('bid_strategy', {}).get('check_depth_of_market', {})
if ((bid_check_dom.get('enabled', False)) and if ((bid_check_dom.get('enabled', False)) and
(bid_check_dom.get('bids_to_ask_delta', 0) > 0)): (bid_check_dom.get('bids_to_ask_delta', 0) > 0)):
# TODO-lev: Does the below need to be adjusted for shorts?
if self._check_depth_of_market( if self._check_depth_of_market(
pair, pair,
bid_check_dom, bid_check_dom,
side=signal side=signal
): ):
return self.execute_entry(pair, stake_amount, enter_tag=enter_tag) return self.execute_entry(
pair,
stake_amount,
enter_tag=enter_tag,
is_short=(signal == SignalDirection.SHORT)
)
else: else:
return False return False
return self.execute_entry(pair, stake_amount, enter_tag=enter_tag) return self.execute_entry(
pair,
stake_amount,
enter_tag=enter_tag,
is_short=(signal == SignalDirection.SHORT)
)
else: else:
return False return False