flake8 cleanup

This commit is contained in:
werkkrew 2021-03-13 19:10:34 -05:00
parent 6ac220982c
commit a3d6b472a7
5 changed files with 29 additions and 21 deletions

View File

@ -643,14 +643,23 @@ In order to use these best dynamic ROI parameters found by Hyperopt in backtesti
If you are optimizing dynamic ROI values, Freqtrade creates the 'dynamic-roi' optimization hyperspace for you. By default, the `enabled` parameter will try both True and False values. The value the `type` vary between `linear`, `exponential`, and `connect`.
Other values have default ranges of:
| Param | Range |
|------------|-------------|
| decay-time | 180..1440 |
| decay-rate | 0.001..0.03 |
| start | 0.05..0.25 |
| end | 0..0.005 |
Override the `dynamic_roi_space()` method and define the desired range in it if you want values of the dynamic ROI parameters to vary in other ranges during hyperoptimization. A sample for this method can be found in [user_data/hyperopts/sample_hyperopt_advanced.py](https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/templates/sample_hyperopt_advanced.py).
Just as the standard ROI table, the time decay value (in minutes) has a range which varies based on your candle size, for example:
| Candle | Range |
|----------|---------------|
| 1m | 30..144 |
| 5m | 150..720 |
| 1h | 1800..8640 |
| 1d | 3456..207360 |
It is **highly** recommended to override the `dynamic_roi_space()` method and define the desired ranges in it if you want values of the dynamic ROI parameters to vary in other ranges during hyperoptimization. A sample for this method can be found in [user_data/hyperopts/sample_hyperopt_advanced.py](https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/templates/sample_hyperopt_advanced.py).
## Show details of Hyperopt results

View File

@ -263,7 +263,6 @@ class IHyperOpt(ABC):
Real(0, 0.005, name='dynamic_roi_end')
]
# This is needed for proper unpickling the class attribute ticker_interval
# which is set to the actual value by the resolver.
# Why do I still need such shamanic mantras in modern python?

View File

@ -275,9 +275,9 @@ class AdvancedSampleHyperOpt(IHyperOpt):
You may override it in your custom Hyperopt class.
If you are reducing the types, you may also remove the parameters that will not be used on the
reduced scope. For example, if you reduce the types to only 'connect' you do not need to specify
the ranges for decay-rate, decay-time, start, or end.
If you are reducing the types, you may also remove the parameters that will not be used on
the reduced scope. For example, if you reduce the types to only 'connect' you do not
need to specify the ranges for decay-rate, decay-time, start, or end.
"""
return [
Categorical([True, False], name='dynamic_roi_enabled'),