Closed qkum closed 2 years ago
If it is me who is too n00b to understand the code.
Then please write something that tells people why the code is calculating values within a range for the strategy to use for an indicator - but with no space="buy/sell"
.
Edit: The variable names are not as bad as I remembered. It is just me who are getting confused because the code is missing prober commenting and I have to guess it all after staring at code for many hours in a row 🌴
I suspect that the code uses the "default" value if space="buy/sell"
is missing.
I tried to add space="buy"
space="sell"
to the indicators and then their value suddenly was outputted.
Like if someone deleted it before uploading it because they had found some good values for those indicators from hyperopting and then forgetting to add the code back before sharing it.
# Define the parameter spaces
adx_period = IntParameter(4, 24, default=14)
ema_short_period = IntParameter(4, 24, default=8)
ema_long_period = IntParameter(12, 175, default=21)
parameters where the space they belong to is unclear will be ignored.
Parameters must either be assigned to a variable named
buy_*
orsell_*
- or containspace='buy'
|space='sell'
to be assigned to a space correctly. If no parameter is available for a space, you'll receive the error that no space was found when running hyperopt.
source - the "Parameter space assignment" box.
The error will appear if naming is inconclusive (e.g. sell_ema_long_period = IntParameter(12, 175, default=21, space="buy")
- but parameters that have neither prefix nor space assigned will simply be ignored at the moment.
We'll probably update wording in the note-box to be more specific about this.
Describe your environment
Ubuntu
Python 3.10.0
(python -V
)ccxt==1.79.88
(pip freeze | grep ccxt
)freqtrade develop-e4629a273
(freqtrade -V
ordocker-compose run --rm freqtrade -V
for Freqtrade running in docker)Note: All bug reports will be closed without further comment if the above template is deleted or not filled out.
Describe the problem:
Explain the problem you have encountered
This is from the .json file hyperopting this strategy outputs. Same output as in the terminal:
{ "strategy_name": "Hyperopt_f_reinforced_average", "params": { "buy": { "pos_entry_adx": 28.2 }, "sell": { "pos_exit_adx": 34.7 }, "protection": { "lookback_period_candles": 51, "required_profit": 0.031, "stop_duration_candles": 87, "trade_limit": 2 }, "roi": { "0": 0.07999999999999999, "23": 0.057999999999999996, "64": 0.011, "144": 0 }, "stoploss": { "stoploss": -0.287 }, "trailing": { "trailing_stop": true, "trailing_stop_positive": 0.069, "trailing_stop_positive_offset": 0.10400000000000001, "trailing_only_offset_is_reached": false } }, "ft_stratparam_v": 1, "export_time": "2022-07-06 12:53:34.147246+00:00" }
Steps to reproduce:
--spaces all
to make sure it hyperopted all spaces and therefore all 5 variables that also should be outputted.Observed Results:
But it "hyperopts" 5 from what I can see.
What did you expect to happen?
5 indicator values outputted as used in the hyperopt.
Relevant code exceptions or logs
See above.
I'm testing those strategies to figure out how to hyperopt several indicators at once and this strategy seemes to do this, but not outputting them all.
Thanks for all your hard work on this bot, freqtrade peeps 🎖️