From ea6d4a9d362e0ac733562e50185bd90bee6e4454 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Sat, 16 Feb 2019 19:50:55 +0300 Subject: [PATCH] fetch amount_reserve_percent from config --- freqtrade/freqtradebot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 4247a6612..3dea34df1 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -290,7 +290,8 @@ class FreqtradeBot(object): if not min_stake_amounts: 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: amount_reserve_percent += self.strategy.stoploss # it should not be more than 50%