From 7e7c82cf4a80cd7d70a3a0317cf7158cefd9c6f5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 3 Jan 2020 11:34:17 +0100 Subject: [PATCH] Small adjustments to relative_stake PR --- docs/configuration.md | 2 +- docs/edge.md | 2 +- freqtrade/configuration/deprecated_settings.py | 4 ++-- tests/test_configuration.py | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index e9756e8ac..3b8760366 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -146,7 +146,7 @@ For example, if you have 10 ETH available in your wallet on the exchange and `tr !!! Warning `tradable_balance_ratio` applies to the current balance (free balance + tied up in trades). Therefore, assuming a starting balance of 1000, a configuration of `tradable_balance_ratio=0.99` will not guarantee that 10 units will always remain available on the exchange. The free amount may reduce to 5 units if the total balance is reduce to 500 (either by a losing streak, or by withdrawing balance). -#### Static Stake amount +#### Static stake amount The `stake_amount` configuration statically configures the amount of stake-currency your bot will use for each trade. diff --git a/docs/edge.md b/docs/edge.md index 95f3de42e..dcefe7451 100644 --- a/docs/edge.md +++ b/docs/edge.md @@ -148,7 +148,7 @@ Edge module has following configuration options: | `enabled` | If true, then Edge will run periodically.
*Defaults to `false`.*
***Datatype:*** *Boolean* | `process_throttle_secs` | How often should Edge run in seconds.
*Defaults to `3600` (once per hour).*
***Datatype:*** *Integer* | `calculate_since_number_of_days` | Number of days of data against which Edge calculates Win Rate, Risk Reward and Expectancy.
**Note** that it downloads historical data so increasing this number would lead to slowing down the bot.
*Defaults to `7`.*
***Datatype:*** *Integer* -| `capital_available_percentage` | **DEPRECATED - replaced with `tradable_balance_ratio`** This is the percentage of the total capital on exchange in stake currency.
As an example if you have 10 ETH available in your wallet on the exchange and this value is 0.5 (which is 50%), then the bot will use a maximum amount of 5 ETH for trading and considers it as available capital.
*Defaults to `0.5`.*
***Datatype:*** *Float* +| `capital_available_percentage` | **DEPRECATED - [replaced with `tradable_balance_ratio`](configuration.md#Available balance)** This is the percentage of the total capital on exchange in stake currency.
As an example if you have 10 ETH available in your wallet on the exchange and this value is 0.5 (which is 50%), then the bot will use a maximum amount of 5 ETH for trading and considers it as available capital.
*Defaults to `0.5`.*
***Datatype:*** *Float* | `allowed_risk` | Ratio of allowed risk per trade.
*Defaults to `0.01` (1%)).*
***Datatype:*** *Float* | `stoploss_range_min` | Minimum stoploss.
*Defaults to `-0.01`.*
***Datatype:*** *Float* | `stoploss_range_max` | Maximum stoploss.
*Defaults to `-0.10`.*
***Datatype:*** *Float* diff --git a/freqtrade/configuration/deprecated_settings.py b/freqtrade/configuration/deprecated_settings.py index a104bf6e3..78d8218d4 100644 --- a/freqtrade/configuration/deprecated_settings.py +++ b/freqtrade/configuration/deprecated_settings.py @@ -81,8 +81,8 @@ def process_temporary_deprecated_settings(config: Dict[str, Any]) -> None: "PrecisionFilter. Please refer to the docs on configuration details") config['pairlists'].append({'method': 'PrecisionFilter'}) - if (config.get('edge', {}.get('enabled', False)) - and config.get('edge', {}).get('capital_available_percentage')): + if (config.get('edge', {}).get('enabled', False) + and 'capital_available_percentage' in config.get('edge', {})): logger.warning( "DEPRECATED: " "Using 'edge.capital_available_percentage' has been deprecated in favor of " diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 3e7b51c0e..a489875d9 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -1039,6 +1039,7 @@ def test_process_deprecated_setting_pairlists(mocker, default_conf, caplog): def test_process_deprecated_setting_edge(mocker, edge_conf, caplog): patched_configuration_load_config_file(mocker, edge_conf) edge_conf.update({'edge': { + 'enabled': True, 'capital_available_percentage': 0.5, }})