-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamic/configurable SMA intervals #2503
base: master
Are you sure you want to change the base?
Conversation
I have implemented the management of SMA intervals (or is another term for "intervals" more appropriate for this?) as a design: 2021-11-27.20-31-20.movWould this be a viable option for management in this form? Suggestions/feedback are welcome. Open points are still:
|
This comment was marked as outdated.
This comment was marked as outdated.
I noticed that the forum also asked about changing the color scheme: https://forum.portfolio-performance.info/t/farbaenderung-im-performance-diagramm/6115 By the way, I set the PR back to Draft. Because: In connection with another function (Column with relative delta of SMAx to current price in securities overview), it may be necessary to proceed somewhat differently here. @buchen I know that you have rather less time to examine larger PRs. My question in general would be only whether the following functions could generally come in or you rather say that will not come anyway (then I do not have to make the effort ;) ):
|
Currently, fixed intervals are available for SMA and EMA.
Here and here freely configurable intervals were requested.
EDIT: Change of the coloring of the SMA/EMA lines was requested in the forum here and here
I took a look at how this could be changed. The first commit (c817fb7) includes everything that is necessary (from my point of view) to bring the fixed intervals into a dynamically expandable list. This would make everything look the same for the operators. Only in the background the data handling changes.
I am a bit unsure about the way the dynamic intervals are stored. With the commit this is done via a 2D map (Map<Integer, TypedMap>). Dimension 1 = interval size in days (e.g. 200 days). Dimension 2 = settings necessary for each interval (isActive + color).
So there is quite a lot of overhead in the xml file. But the advantage is that the single values can be changed easily (e.g. when showing/hiding an interval or changing the color).
A lighter storage would be possible in a 1D-Map by using the interval size as key and a self constructed string as value, which contains isActive and the color.
Maybe you, @buchen have an idea (if the 2D map is not convenient).
However, the new dynamic list cannot yet be extended with this commit. A corresponding interface is still missing.
My current idea would be to offer a "Manage..." button in the context menu, which then opens a dialog in which you can insert/delete intervals and change their color in the chart:
I'll see if I can implement the dialog soon.
Greetz
OnkelDok
EDIT: so far only the data/settings of the SMA charts have been adjusted. For EMA, however, this should then go in the same way. I just wanted to go through the whole thing with one type for now.