mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
autopep8 corrected
This commit is contained in:
parent
f72fb0ad04
commit
ad666ac65c
|
@ -638,11 +638,10 @@ class FreqtradeBot(object):
|
|||
def check_sell(self, trade: Trade, sell_rate: float, buy: bool, sell: bool) -> bool:
|
||||
if (self.config['edge']['enabled']):
|
||||
stoploss = self.edge.stoploss(trade.pair)
|
||||
should_sell = \
|
||||
self.strategy.should_sell(trade, sell_rate, datetime.utcnow(), buy, sell, stoploss)
|
||||
should_sell = self.strategy.should_sell(
|
||||
trade, sell_rate, datetime.utcnow(), buy, sell, stoploss)
|
||||
else:
|
||||
should_sell = \
|
||||
self.strategy.should_sell(trade, sell_rate, datetime.utcnow(), buy, sell)
|
||||
should_sell = self.strategy.should_sell(trade, sell_rate, datetime.utcnow(), buy, sell)
|
||||
|
||||
if should_sell.sell_flag:
|
||||
self.execute_sell(trade, sell_rate, should_sell.sell_type)
|
||||
|
|
|
@ -210,9 +210,12 @@ class IStrategy(ABC):
|
|||
:return: True if trade should be sold, False otherwise
|
||||
"""
|
||||
current_profit = trade.calc_profit_percent(rate)
|
||||
stoplossflag = \
|
||||
self.stop_loss_reached(current_rate=rate, trade=trade, current_time=date,
|
||||
current_profit=current_profit, force_stoploss=force_stoploss)
|
||||
stoplossflag = self.stop_loss_reached(
|
||||
current_rate=rate,
|
||||
trade=trade,
|
||||
current_time=date,
|
||||
current_profit=current_profit,
|
||||
force_stoploss=force_stoploss)
|
||||
|
||||
if stoplossflag.sell_flag:
|
||||
return stoplossflag
|
||||
|
|
Loading…
Reference in New Issue
Block a user