Add missing import to hyperopt docs

This commit is contained in:
Matthias 2022-10-25 20:20:51 +02:00
parent 1ef38f137d
commit d94c0039eb

View File

@ -78,6 +78,8 @@ This function needs to return a floating point number (`float`). Smaller numbers
To override a pre-defined space (`roi_space`, `generate_roi_table`, `stoploss_space`, `trailing_space`), define a nested class called Hyperopt and define the required spaces as follows: To override a pre-defined space (`roi_space`, `generate_roi_table`, `stoploss_space`, `trailing_space`), define a nested class called Hyperopt and define the required spaces as follows:
```python ```python
from freqtrade.optimize.space import Integer, SKDecimal
class MyAwesomeStrategy(IStrategy): class MyAwesomeStrategy(IStrategy):
class HyperOpt: class HyperOpt:
# Define a custom stoploss space. # Define a custom stoploss space.