Merge pull request #2479 from freqtrade/fix/bids_to_delta
Fix bug where bids_to_ask_delta causes doublebuys
This commit is contained in:
commit
6df1dd1ef2
@ -319,7 +319,6 @@ class FreqtradeBot:
|
|||||||
(bidstrat_check_depth_of_market.get('bids_to_ask_delta', 0) > 0):
|
(bidstrat_check_depth_of_market.get('bids_to_ask_delta', 0) > 0):
|
||||||
if self._check_depth_of_market_buy(_pair, bidstrat_check_depth_of_market):
|
if self._check_depth_of_market_buy(_pair, bidstrat_check_depth_of_market):
|
||||||
buycount += self.execute_buy(_pair, stake_amount)
|
buycount += self.execute_buy(_pair, stake_amount)
|
||||||
else:
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
buycount += self.execute_buy(_pair, stake_amount)
|
buycount += self.execute_buy(_pair, stake_amount)
|
||||||
|
@ -3213,6 +3213,8 @@ def test_order_book_depth_of_market(default_conf, ticker, limit_buy_order, fee,
|
|||||||
assert trade.open_date is not None
|
assert trade.open_date is not None
|
||||||
assert trade.exchange == 'bittrex'
|
assert trade.exchange == 'bittrex'
|
||||||
|
|
||||||
|
assert len(Trade.query.all()) == 1
|
||||||
|
|
||||||
# Simulate fulfilled LIMIT_BUY order for trade
|
# Simulate fulfilled LIMIT_BUY order for trade
|
||||||
trade.update(limit_buy_order)
|
trade.update(limit_buy_order)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user