This commit is contained in:
misagh 2018-11-22 17:07:37 +01:00
parent da5617624c
commit bbe8e4e494
3 changed files with 6 additions and 5 deletions

View File

@ -349,7 +349,8 @@ class Exchange(object):
raise OperationalException( raise OperationalException(
'In stoploss limit order, stop price should be more than limit price') 'In stoploss limit order, stop price should be more than limit price')
return self._api.create_order(pair, 'stop_loss', 'sell', amount, rate, {'stopPrice': stop_price}) return self._api.create_order(pair, 'stop_loss', 'sell',
amount, rate, {'stopPrice': stop_price})
@retrier @retrier
def get_balance(self, currency: str) -> float: def get_balance(self, currency: str) -> float:

View File

@ -492,8 +492,8 @@ class FreqtradeBot(object):
# 0.98 is arbitrary here. # 0.98 is arbitrary here.
limit_price = stop_price * 0.98 limit_price = stop_price * 0.98
stoploss_order_id = self.exchange.stoploss_limit(pair=pair, amount=amount, stoploss_order_id = self.exchange.stoploss_limit(
stop_price=stop_price, rate=limit_price)['id'] pair=pair, amount=amount, stop_price=stop_price, rate=limit_price)['id']
self.rpc.send_msg({ self.rpc.send_msg({
'type': RPCMessageType.BUY_NOTIFICATION, 'type': RPCMessageType.BUY_NOTIFICATION,

View File

@ -231,8 +231,8 @@ class IStrategy(ABC):
stoplossflag = False stoplossflag = False
else: else:
stoplossflag = self.stop_loss_reached(current_rate=current_rate, trade=trade, stoplossflag = self.stop_loss_reached(current_rate=current_rate, trade=trade,
current_time=date, current_profit=current_profit, current_time=date, current_profit=current_profit,
force_stoploss=force_stoploss) force_stoploss=force_stoploss)
if stoplossflag.sell_flag: if stoplossflag.sell_flag:
return stoplossflag return stoplossflag