test_sell_profit_only_enable_loss and test_create_trade_limit_reached

fixed
This commit is contained in:
misagh 2018-09-24 15:47:07 +02:00
parent 308428644b
commit 027ec4d98e
2 changed files with 3 additions and 1 deletions

View File

@ -402,6 +402,8 @@ class FreqtradeBot(object):
(buy, sell) = self.strategy.get_signal(_pair, interval, self.exchange.klines.get(_pair)) (buy, sell) = self.strategy.get_signal(_pair, interval, self.exchange.klines.get(_pair))
if buy and not sell: if buy and not sell:
stake_amount = self._get_trade_stake_amount(_pair) stake_amount = self._get_trade_stake_amount(_pair)
if not stake_amount:
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', {})

View File

@ -1423,7 +1423,7 @@ def test_sell_profit_only_enable_loss(default_conf, limit_buy_order, fee, market
freqtrade = FreqtradeBot(default_conf) freqtrade = FreqtradeBot(default_conf)
patch_get_signal(freqtrade) patch_get_signal(freqtrade)
freqtrade.strategy.stop_loss_reached = \ freqtrade.strategy.stop_loss_reached = \
lambda current_rate, trade, current_time, current_profit: SellCheckTuple( lambda current_rate, trade, current_time, force_stoploss, current_profit: SellCheckTuple(
sell_flag=False, sell_type=SellType.NONE) sell_flag=False, sell_type=SellType.NONE)
freqtrade.create_trade() freqtrade.create_trade()