Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

馃悶 Hyperopt is ignoring trailing_stop_positive_offset_max_value #53

Closed
3ylo opened this issue Jun 5, 2021 · 5 comments 路 Fixed by #57
Closed

馃悶 Hyperopt is ignoring trailing_stop_positive_offset_max_value #53

3ylo opened this issue Jun 5, 2021 · 5 comments 路 Fixed by #57
Assignees
Labels
Bug - Fixed Issue has been resolved
Milestone

Comments

@3ylo
Copy link
Contributor

3ylo commented Jun 5, 2021

The hyperopt is ignoring the "trailing_stop_positive_offset_max_value": 0.028 and opting for values higher than the configured max_value.

"trailing_stop_positive_min_value": 0.01,
"trailing_stop_positive_max_value": 0.021,
"trailing_stop_positive_offset_min_value": 0.011,
"trailing_stop_positive_offset_max_value": 0.028,

Trailing stop:

trailing_stop = True
trailing_stop_positive = 0.014
trailing_stop_positive_offset = 0.038
trailing_only_offset_is_reached = True
@Rikj000 Rikj000 added Bug - Fix Needed Something isn't working as expected Planned Planned feature, improvement or bugfix (not being worked on yet) labels Jun 5, 2021
@Rikj000
Copy link
Owner

Rikj000 commented Jun 6, 2021

On my end the results also appear off! 馃槷
Appears to only occur for the trailing_stop_positive_offset value.

mgm-config.json - stoploss_spaces section:

{
    "stoploss_min_value": -0.02,
    "stoploss_max_value": -0.35,
    "trailing_stop_positive_min_value": 0.01,
    "trailing_stop_positive_max_value": 0.35,
    "trailing_stop_positive_offset_min_value": 0.011,
    "trailing_stop_positive_offset_max_value": 0.1
}

Results found:

# Stoploss:
stoploss = -0.288

# Trailing stop:
trailing_stop = True
trailing_stop_positive = 0.253
trailing_stop_positive_offset = 0.326
trailing_only_offset_is_reached = True

@Rikj000 Rikj000 added this to the v0.12.0 milestone Jun 6, 2021
@raftersvk
Copy link
Contributor

coud it be just the position of the default values interfering with the mgm-comfig.json
on my local setup I have commented that part ant it works perfectly so far :
image

@Rikj000
Copy link
Owner

Rikj000 commented Jun 7, 2021

coud it be just the position of the default values interfering with the mgm-comfig.json
on my local setup I have commented that part ant it works perfectly so far :

Truly nice findings @raftersvk! 馃憦 So a little more exact, you commented out lines 118 - 125? 馃憖
I would leave the buy_params and sell_params lines (119 - 120) there though, to prevent issues when loading in 'mgm-config-hyperopt.json during the second HyperOpt Run.

Currently I'm still working on the Docs & HyperOpting protections, would be nice if you could provide some of the fixed results in the meantime to speed things up 馃檪

@Rikj000 Rikj000 added In Progress This is being worked on and removed Planned Planned feature, improvement or bugfix (not being worked on yet) labels Jun 7, 2021
@raftersvk
Copy link
Contributor

indeed I have left the buy / sell_params for the strat to work properly.

@Rikj000
Copy link
Owner

Rikj000 commented Jun 9, 2021

So when taking a closer look at the documentation I wondered if there even was a bug at all
MGM-Custom-Stoploss
And after diving in Freqtrades source code I can confirm all looks to be in order 馃帀
Freqtrade-Source-Stoploss

trailing_stop_positive_offset_min_value & trailing_stop_positive_offset_max_value
Their parameter names are not clear without documentation, since they don't make up the final trailing_stop_positive_offset on their own
They first add up the trailing_stop_positive 馃檪
It's basically just an intermediate parameter that caused us some confusion 馃槃

@Rikj000 Rikj000 closed this as completed Jun 9, 2021
@Rikj000 Rikj000 added Bug - Fixed Issue has been resolved and removed Bug - Fix Needed Something isn't working as expected In Progress This is being worked on labels Jun 9, 2021
@Rikj000 Rikj000 changed the title Hyperopt is ignoring trailing_stop_positive_offset_max_value 馃悶 Hyperopt is ignoring trailing_stop_positive_offset_max_value Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug - Fixed Issue has been resolved
Development

Successfully merging a pull request may close this issue.

3 participants