changed trades_space to max_open_trades_space

This commit is contained in:
Antonio Della Fortuna
2023-01-15 11:50:40 +01:00
parent 5e64980319
commit ab12aace5f
6 changed files with 11 additions and 10 deletions

View File

@@ -75,7 +75,7 @@ This function needs to return a floating point number (`float`). Smaller numbers
## Overriding pre-defined spaces
To override a pre-defined space (`roi_space`, `generate_roi_table`, `stoploss_space`, `trailing_space`, `trades_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`, `max_open_trades_space`), define a nested class called Hyperopt and define the required spaces as follows:
```python
from freqtrade.optimize.space import Categorical, Dimension, Integer, SKDecimal
@@ -125,7 +125,7 @@ class MyAwesomeStrategy(IStrategy):
]
# Define a custom max_open_trades space
def trades_space(self) -> List[Dimension]:
def max_open_trades_space(self) -> List[Dimension]:
return [
Integer(-1, 10, name='max_open_trades'),
]