advanced sample hyperopt added; changes to helpstrings

This commit is contained in:
hroff-1902
2019-08-08 22:45:37 +03:00
parent c6444a10a8
commit 0d4a2c6c3a
3 changed files with 271 additions and 9 deletions

View File

@@ -14,25 +14,27 @@ import freqtrade.vendor.qtpylib.indicators as qtpylib
from freqtrade.optimize.hyperopt_interface import IHyperOpt
# This class is a sample. Feel free to customize it.
class SampleHyperOpts(IHyperOpt):
"""
This is a test hyperopt to inspire you.
This is a sample hyperopt to inspire you.
Feel free to customize it.
More information in https://github.com/freqtrade/freqtrade/blob/develop/docs/hyperopt.md
You can:
- Rename the class name.
You should:
- Rename the class name to some unique name.
- Add any methods you want to build your hyperopt.
- Add any lib you need to build your hyperopt.
You must keep:
- The prototypes for the methods: populate_indicators, indicator_space, buy_strategy_generator.
The roi_space, generate_roi_table, stoploss_space methods were moved to the parent class, you may
override them here if you need it.
The roi_space, generate_roi_table, stoploss_space methods are no longer required to be
copied in every custom hyperopt. However, you may override them if you need the
'roi' and the 'stoploss' spaces that differ from the defaults offered by Freqtrade.
Sample implementation of these methods can be found in
https://github.com/freqtrade/freqtrade/blob/develop/user_data/hyperopts/sample_hyperopt_advanced.py
"""
@staticmethod
def populate_indicators(dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['adx'] = ta.ADX(dataframe)