Fix small parenteses bug
This commit is contained in:
parent
47e46bf205
commit
d44f6651c4
@ -77,7 +77,7 @@ class Awesomestrategy(IStrategy):
|
||||
ob = self.dp.orderbook(pair, 1)
|
||||
current_price = ob['bids'][0][0]
|
||||
# Cancel buy order if price is more than 2% above the order.
|
||||
if order['price'] * 0.98 < best_bid:
|
||||
if order['price'] > current_price * 1.02:
|
||||
return True
|
||||
return False
|
||||
|
||||
@ -86,7 +86,7 @@ class Awesomestrategy(IStrategy):
|
||||
ob = self.dp.orderbook(pair, 1)
|
||||
current_price = ob['asks'][0][0]
|
||||
# Cancel sell order if price is more than 2% below the order.
|
||||
if order['price'] * 1.02 > current_price:
|
||||
if order['price'] < current_price * 0.98:
|
||||
return True
|
||||
return False
|
||||
```
|
||||
|
@ -847,24 +847,24 @@ class FreqtradeBot:
|
||||
self.wallets.update()
|
||||
continue
|
||||
|
||||
if ((order['side'] == 'buy' and order['status'] == 'canceled')
|
||||
if (order['side'] == 'buy' and (order['status'] == 'canceled'
|
||||
or self._check_timed_out('buy', order)
|
||||
or strategy_safe_wrapper(self.strategy.check_buy_timeout,
|
||||
default_retval=False)(pair=trade.pair,
|
||||
trade=trade,
|
||||
order=order)):
|
||||
order=order))):
|
||||
|
||||
self.handle_timedout_limit_buy(trade, order)
|
||||
self.wallets.update()
|
||||
order_type = self.strategy.order_types['buy']
|
||||
self._notify_buy_cancel(trade, order_type)
|
||||
|
||||
elif ((order['side'] == 'sell' and order['status'] == 'canceled')
|
||||
elif (order['side'] == 'sell' and (order['status'] == 'canceled'
|
||||
or self._check_timed_out('sell', order)
|
||||
or strategy_safe_wrapper(self.strategy.check_sell_timeout,
|
||||
default_retval=False)(pair=trade.pair,
|
||||
trade=trade,
|
||||
order=order)):
|
||||
order=order))):
|
||||
self.handle_timedout_limit_sell(trade, order)
|
||||
self.wallets.update()
|
||||
order_type = self.strategy.order_types['sell']
|
||||
|
Loading…
Reference in New Issue
Block a user