move default amount_reserve_percent value into constants

This commit is contained in:
hroff-1902
2019-02-19 04:40:03 +03:00
committed by hroff-1902
parent 6d7834a389
commit e043df6480
2 changed files with 3 additions and 0 deletions

View File

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