From e4b488cb8472fdb834dd03d025902313f84d2f44 Mon Sep 17 00:00:00 2001 From: hippocritical Date: Sun, 23 Jul 2023 20:05:29 +0200 Subject: [PATCH] added stake_amount to a fixed 10k value. In a combination with a wallet size of 1 billion it should never be able to run out of money avoiding false-positives of some users who just wanted to test a strategy without actually checking how the stake_amount-variable should be used in combination with the strategy-function custom_stake_amount. reason: some strategies demand a custom_stake_amount of 1$ demanding a very large wallet-size (which already was set previously) Others start with 100% of a slot size and subdivide the base-orders and safety-orders down to finish at 100% of a slot-size and use unlimited stake_amount. Edited docs to reflect that change. --- docs/lookahead-analysis.md | 4 ++-- freqtrade/optimize/lookahead_analysis_helpers.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/lookahead-analysis.md b/docs/lookahead-analysis.md index c6eaa3e3c..e998b1b77 100644 --- a/docs/lookahead-analysis.md +++ b/docs/lookahead-analysis.md @@ -21,8 +21,8 @@ It also supports the lookahead-analysis of freqai strategies. - `--cache` is forced to "none". - `--max-open-trades` is forced to be at least equal to the number of pairs. -- `--dry-run-wallet` is forced to be basically infinite. -- `--stake-amount` is forced to be 10 k. +- `--dry-run-wallet` is forced to be basically infinite (1 billion). +- `--stake-amount` is forced to be a static 10000 (10k). Those are set to avoid users accidentally generating false positives. diff --git a/freqtrade/optimize/lookahead_analysis_helpers.py b/freqtrade/optimize/lookahead_analysis_helpers.py index 7b1158fc8..1fd4706f5 100644 --- a/freqtrade/optimize/lookahead_analysis_helpers.py +++ b/freqtrade/optimize/lookahead_analysis_helpers.py @@ -136,11 +136,12 @@ class LookaheadAnalysisSubFunctions: logger.info('Dry run wallet was not set to 1 billion, pushing it up there ' 'just to avoid false positives') config['dry_run_wallet'] = min_dry_run_wallet + # fix stake_amount to 10k. # in a combination with a wallet size of 1 billion it should always be able to trade # no matter if they use custom_stake_amount as a small percentage of wallet size # or fixate custom_stake_amount to a certain value. - logger.info('fixing stake_amount to 10.000') + logger.info('fixing stake_amount to 10k') config['stake_amount'] = 10000 # enforce cache to be 'none', shift it to 'none' if not already