fetch amount_reserve_percent from config
This commit is contained in:
parent
e0c420b93f
commit
ea6d4a9d36
@ -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%
|
||||||
|
Loading…
Reference in New Issue
Block a user