fetch amount_reserve_percent from config

This commit is contained in:
hroff-1902 2019-02-16 19:50:55 +03:00 committed by GitHub
parent e0c420b93f
commit ea6d4a9d36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,7 +290,8 @@ class FreqtradeBot(object):
if not min_stake_amounts: if not min_stake_amounts:
return None return None
amount_reserve_percent = 1 - 0.05 # reserve 5% + stoploss # reserve some percent defined in config (5% default) + stoploss
amount_reserve_percent = 1.0 - self.config.get('amount_reserve_percent', 0.05)
if self.strategy.stoploss is not None: if self.strategy.stoploss is not None:
amount_reserve_percent += self.strategy.stoploss amount_reserve_percent += self.strategy.stoploss
# it should not be more than 50% # it should not be more than 50%