From aacc1d5004004e47627de66739167a963418cecc Mon Sep 17 00:00:00 2001 From: misagh Date: Sat, 10 Nov 2018 18:28:05 +0100 Subject: [PATCH] removing total capital in favour of stake amount --- config_full.json.example | 1 - docs/edge.md | 8 +++----- freqtrade/constants.py | 1 - freqtrade/tests/conftest.py | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/config_full.json.example b/config_full.json.example index a7fdd5bab..9dba8f539 100644 --- a/config_full.json.example +++ b/config_full.json.example @@ -63,7 +63,6 @@ "enabled": false, "process_throttle_secs": 3600, "calculate_since_number_of_days": 2, - "total_capital_in_stake_currency": 0.5, "allowed_risk": 0.01, "stoploss_range_min": -0.01, "stoploss_range_max": -0.1, diff --git a/docs/edge.md b/docs/edge.md index dc4fda72a..cfb95b936 100644 --- a/docs/edge.md +++ b/docs/edge.md @@ -82,6 +82,8 @@ Allowed capital at risk is calculated as follows: **allowed capital at risk** = **total capital** X **allowed risk per trade** +**total capital** is your stake amount. + **Stoploss** is calculated as described above against historical data. Your position size then will be: @@ -89,8 +91,7 @@ Your position size then will be: **position size** = **allowed capital at risk** / **stoploss** Example: -Let's say your total capital is 3 ETH, you would allow 1% of risk for each trade. thus your allowed capital at risk would be **3 x 0.01 = 0.03 ETH**. Let's assume Edge has calculated that for **XLM/ETH** market your stoploss should be at 2%. So your position size will be **0.03 / 0.02= 1.5ETH**.
-**Notice:** if Edge is enabled, the stake_amount config is overriden by total_capital_in_stake_currency config explained below (see configuration part) +Let's say your stake amount is 3 ETH, you would allow 1% of risk for each trade. thus your allowed capital at risk would be **3 x 0.01 = 0.03 ETH**. Let's assume Edge has calculated that for **XLM/ETH** market your stoploss should be at 2%. So your position size will be **0.03 / 0.02= 1.5ETH**.
## Configurations Edge has following configurations: @@ -108,9 +109,6 @@ Number of days of data against which Edge calculates Win Rate, Risk Reward and E Note that it downloads historical data so increasing this number would lead to slowing down the bot
(default to 7) -#### total_capital_in_stake_currency -This your total capital at risk in your stake currency. If edge is enabled then stake_amount is ignored in favor of this parameter - #### allowed_risk Percentage of allowed risk per trade
(default to 1%) diff --git a/freqtrade/constants.py b/freqtrade/constants.py index d37e78687..b7c069c45 100644 --- a/freqtrade/constants.py +++ b/freqtrade/constants.py @@ -178,7 +178,6 @@ CONF_SCHEMA = { "enabled": {'type': 'boolean'}, "process_throttle_secs": {'type': 'integer', 'minimum': 600}, "calculate_since_number_of_days": {'type': 'integer'}, - "total_capital_in_stake_currency": {'type': 'number'}, "allowed_risk": {'type': 'number'}, "stoploss_range_min": {'type': 'number'}, "stoploss_range_max": {'type': 'number'}, diff --git a/freqtrade/tests/conftest.py b/freqtrade/tests/conftest.py index b93140860..487d0d150 100644 --- a/freqtrade/tests/conftest.py +++ b/freqtrade/tests/conftest.py @@ -787,7 +787,7 @@ def edge_conf(default_conf): "enabled": True, "process_throttle_secs": 1800, "calculate_since_number_of_days": 14, - "total_capital_in_stake_currency": 0.5, + #"total_capital_in_stake_currency": 0.5, "allowed_risk": 0.01, "stoploss_range_min": -0.01, "stoploss_range_max": -0.1,