* `trade_count`: Amount of trades (identical to `len(results)`)
* `min_date`: Start date of the hyperopting TimeFrame
* `min_date`: End date of the hyperopting TimeFrame
This function needs to return a floating point number (`float`). The smaller that number, the better is the result. The parameters and balancing for this are up to you.
!!! Note
This function is called once per iteration - so please make sure to have this as optimized as possible to now slow hyperopt down unnecessarily.
!!! Note
The last 2 arguments, `*args` and `**kwargs` are not strictly necessary but ensure compatibility for the future, so we can easily enable more parameters once we discover what could be usefull without breaking your custom hyperopt file.
## Execute Hyperopt
Once you have updated your hyperopt configuration you can run it.
@ -197,14 +237,14 @@ new buy strategy you have.
Legal values are:
-`all`: optimize everything
-`buy`: just search for a new buy strategy
-`sell`: just search for a new sell strategy
-`roi`: just optimize the minimal profit table for your strategy
-`stoploss`: search for the best stoploss value
- space-separated list of any of the above values for example `--spaces roi stoploss`
*`all`: optimize everything
*`buy`: just search for a new buy strategy
*`sell`: just search for a new sell strategy
*`roi`: just optimize the minimal profit table for your strategy
*`stoploss`: search for the best stoploss value
* space-separated list of any of the above values for example `--spaces roi stoploss`
### Position stacking and disabling max market positions.
### Position stacking and disabling max market positions
In some situations, you may need to run Hyperopt (and Backtesting) with the
`--eps`/`--enable-position-staking` and `--dmmp`/`--disable-max-market-positions` arguments.