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

✨ Allow config difference core trend timeframe #156

Merged
merged 8 commits into from
Oct 15, 2021

Conversation

taina0407
Copy link
Contributor

  • Add new 'trend_timeframe' in mgm-config.json to setting timeframe to detect core trend, if not set then using default timeframe

TODO:

  • Didn't found any documentation about HT_TRENDMODE required startup candles number, so currently setting it to 200. This should to optimize incase of using long core trend timeframe like 1d might cause the bot loading candle pretty slow
  • Using better logic to merge core_trend column to informative and main dataframe, because I'm quite new on python so don't know a good way to implement it yet, currently using manual rename and delete

@Rikj000 Rikj000 self-requested a review October 10, 2021 12:44
@Rikj000 Rikj000 added Feature - Enhancement Update or improvement to existing feature Feature - New New feature or pull request In Progress This is being worked on labels Oct 10, 2021
@Rikj000 Rikj000 added this to the v0.13.0 milestone Oct 10, 2021
@Rikj000 Rikj000 linked an issue Oct 10, 2021 that may be closed by this pull request
@Rikj000 Rikj000 changed the title Allow config difference core trend timeframe ✨ Allow config difference core trend timeframe Oct 10, 2021
Copy link
Owner

@Rikj000 Rikj000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some improvements to the code already as I was setting up a development environment for this PR.
I'll get to more thorough debugging of the code soon & will see if all checks out and if I can find a way to do this with a bit less code duplication.

@taina0407 already thank you for this PR! 🙏
Feel free to also try to find a solution for this with less code duplication 🙂

Copy link
Owner

@Rikj000 Rikj000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also tested with PyCharms debugger and the implementation looks good to me! 😄

I took the liberty of also removing some double/unused dataframe columns which I noticed during my debugging, this should result in less memory usage & perhaps a faster HyperOpt too 🙂

However I still need to thoroughly test both of our changes now before I get to merging.
Feel free to already append some test results:

  • From before the PR implementation as comparison
  • Some of the best results yielded with the new feature implemented

So we can be sure & document it in this PR that it does indeed bring improvements

@Rikj000 Rikj000 added the Needs Testing This feature, improvement or bugfix still is in need of testing label Oct 13, 2021
@Rikj000
Copy link
Owner

Rikj000 commented Oct 14, 2021

With the timeframes configured as following I was already able to yield better results on one of my first tests:

{
    "timeframe": "30m",
    "trend_timeframe": "4h",
    "backtest_timeframe": "5m"
}

core-trend-4h

@Rikj000
Copy link
Owner

Rikj000 commented Oct 15, 2021

@taina0407 1d didn't appear to yield me better results, so I guess I'll make the default 4h.
Then it's up to users to test & improve further upon this settings 🙂

{
    "timeframe": "30m",
    "trend_timeframe": "1d",
    "backtest_timeframe": "5m"
}

1d-core-trend
However as discussed in PMs the implementation of this setting likely will still change a bit with the implementation of issue 44

@Rikj000 Rikj000 removed In Progress This is being worked on Needs Testing This feature, improvement or bugfix still is in need of testing labels Oct 15, 2021
@Rikj000 Rikj000 merged commit ec233c6 into Rikj000:development Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature - Enhancement Update or improvement to existing feature Feature - New New feature or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-TimeFrame usage + Automated zooming
2 participants