edge tests fixed for position sizing

This commit is contained in:
misagh
2018-11-27 14:02:34 +01:00
parent f5a70750f0
commit 159ac6e657
5 changed files with 20 additions and 18 deletions

View File

@@ -336,6 +336,7 @@ class FreqtradeBot(object):
stake_amount = self.edge.stake_amount(
pair, self.wallets.get_free(self.config['stake_currency'])
)
return stake_amount
else:
stake_amount = self.config['stake_amount']
@@ -782,9 +783,6 @@ class FreqtradeBot(object):
if sell_reason in (SellType.STOP_LOSS, SellType.TRAILING_STOP_LOSS):
sell_type = 'stoploss'
if self.config.get('dry_run', False) and sell_type == 'stoploss':
limit = trade.stop_loss
# Execute sell and update trade record
order_id = self.exchange.sell(pair=str(trade.pair),
ordertype=self.strategy.order_types[sell_type],