diff --git a/config_full.json.example b/config_full.json.example index 234722f82..23a36dd4c 100644 --- a/config_full.json.example +++ b/config_full.json.example @@ -3,6 +3,7 @@ "stake_currency": "BTC", "stake_amount": 0.05, "fiat_display_currency": "USD", + "amount_reserve_percent" : 0.05, "dry_run": false, "ticker_interval": "5m", "trailing_stop": false, diff --git a/docs/configuration.md b/docs/configuration.md index 2caae81f1..108e264c6 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -16,6 +16,7 @@ Mandatory Parameters are marked as **Required**. | `max_open_trades` | 3 | **Required.** Number of trades open your bot will have. If -1 then it is ignored (i.e. potentially unlimited open trades) | `stake_currency` | BTC | **Required.** Crypto-currency used for trading. | `stake_amount` | 0.05 | **Required.** Amount of crypto-currency your bot will use for each trade. Per default, the bot will use (0.05 BTC x 3) = 0.15 BTC in total will be always engaged. Set it to `"unlimited"` to allow the bot to use all available balance. +| `amount_reserve_percent` | 0.05 | Reserve some amount in min pair stake amount. Default is 5%. The bot will reserve `amount_reserve_percent` + stop-loss value when calculating min pair stake amount in order to avoid possible trade refusals. | `ticker_interval` | [1m, 5m, 30m, 1h, 1d] | The ticker interval to use (1min, 5 min, 30 min, 1 hour or 1 day). Default is 5 minutes. [Strategy Override](#parameters-in-strategy). | `fiat_display_currency` | USD | **Required.** Fiat currency used to show your profits. More information below. | `dry_run` | true | **Required.** Define if the bot must be in Dry-run or production mode. 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%