unused library + trailing whitespaces removed.
This commit is contained in:
parent
abb398786e
commit
75ba6578a3
@ -404,7 +404,12 @@ class FreqtradeBot(object):
|
|||||||
stake_amount = self._get_trade_stake_amount(_pair)
|
stake_amount = self._get_trade_stake_amount(_pair)
|
||||||
if not stake_amount:
|
if not stake_amount:
|
||||||
return False
|
return False
|
||||||
logger.info('Buy signal found: about create a new trade with stake_amount: %f ...', stake_amount)
|
|
||||||
|
logger.info(
|
||||||
|
'Buy signal found: about create a new trade with stake_amount: %f ...',
|
||||||
|
stake_amount
|
||||||
|
)
|
||||||
|
|
||||||
bidstrat_check_depth_of_market = self.config.get('bid_strategy', {}).\
|
bidstrat_check_depth_of_market = self.config.get('bid_strategy', {}).\
|
||||||
get('check_depth_of_market', {})
|
get('check_depth_of_market', {})
|
||||||
if (bidstrat_check_depth_of_market.get('enabled', False)) and\
|
if (bidstrat_check_depth_of_market.get('enabled', False)) and\
|
||||||
@ -630,9 +635,11 @@ class FreqtradeBot(object):
|
|||||||
def check_sell(self, trade: Trade, sell_rate: float, buy: bool, sell: bool) -> bool:
|
def check_sell(self, trade: Trade, sell_rate: float, buy: bool, sell: bool) -> bool:
|
||||||
if (self.config['edge']['enabled']):
|
if (self.config['edge']['enabled']):
|
||||||
stoploss = self.edge.stoploss(trade.pair)
|
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:
|
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:
|
if should_sell.sell_flag:
|
||||||
self.execute_sell(trade, sell_rate, should_sell.sell_type)
|
self.execute_sell(trade, sell_rate, should_sell.sell_type)
|
||||||
|
@ -16,7 +16,6 @@ import arrow
|
|||||||
from freqtrade import misc, constants, OperationalException
|
from freqtrade import misc, constants, OperationalException
|
||||||
from freqtrade.exchange import Exchange
|
from freqtrade.exchange import Exchange
|
||||||
from freqtrade.arguments import TimeRange
|
from freqtrade.arguments import TimeRange
|
||||||
import importlib
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -210,8 +210,10 @@ class IStrategy(ABC):
|
|||||||
:return: True if trade should be sold, False otherwise
|
:return: True if trade should be sold, False otherwise
|
||||||
"""
|
"""
|
||||||
current_profit = trade.calc_profit_percent(rate)
|
current_profit = trade.calc_profit_percent(rate)
|
||||||
stoplossflag = self.stop_loss_reached(current_rate=rate, trade=trade, current_time=date,
|
stoplossflag = \
|
||||||
current_profit=current_profit, force_stoploss=force_stoploss)
|
self.stop_loss_reached(current_rate=rate, trade=trade, current_time=date,
|
||||||
|
current_profit=current_profit, force_stoploss=force_stoploss)
|
||||||
|
|
||||||
if stoplossflag.sell_flag:
|
if stoplossflag.sell_flag:
|
||||||
return stoplossflag
|
return stoplossflag
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user