You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
So far I have found out that this is how the CHARTEVENT_CHART_CHANGE(9) event is handled.
So it is natural - when the focus is taken away from the chart window, its sizes become different.
Here is the processing:
You should try to control the focus of the chart and not react to changes in case the chart window is out of focus. Or something else along those lines. Unfortunately, I can't run and test it yet to pinpoint the exact causes and method of fixing it.
I went through the forum. The problem has already been discussed. For example. I added such a check to the code:
The bug seems to have disappeared.
Another problem. The unfolding of the panel window is not processed after the indicator was first removed from the chart, and the panel was minimised, and then started again on the chart.
Tomorrow I will try to find out what the bug is....
Artem, another example from the subsequent article about oscillators also glitches when minimising the window and then deleting the program from the chart. It is not an indicator, but an Expert Advisor. Here:
Another problem. The unfolding of the panel window is not handled after the indicator was first removed from the chart, and the panel was minimised, and then re-launched on the chart.
Tomorrow I will try to find out what the bug is....
Here you can check the cause of deinitialisation and not save the panel state to global terminal variables when removing an Expert Advisor (or indicator) from the chart. This is not a solution to the problem, but its concealment. It is not good, of course. But it will do for a quick solution.
Or you need to look into this behaviour. Unfortunately, I have limited time for now.
I went through the forum. The problem has already been discussed. For example. I added such a check to the code:
The bug seems to have disappeared.
Thank you. I will add this panel class to my codes later. By the way, from article to article, in which this panel was used, there were all sorts of improvements. I think here is the last article where the panel was used. But I don't remember if I have refined it yet.
I have attached the code of the panel class here.
Forum on trading, automated trading systems and testing trading strategies
Discussion of the article "Making an information panel for displaying data in indicators and Expert Advisors"
Denis Kirichenko, 2024.09.23 22:26
Another problem. It does not handle the unfolding of the panel window, after the indicator was first removed from the chart, and the panel was minimised, and then started again on the chart....
Yes, in the latest version of Dashboard.mqh there is no such bug. It works.
Yes, in the latest version of Dashboard.mqh there is no such bug. It works.
The new bib also has a bug. If you start the panel on a chart, and then play with the chart window size, the panel sticks to the bottom part when the window is restored. And it doesn't want to get out of there ((
Artem, I have a question. In the void CDashboard::Move(int x, int y) method there is such a thing:
In particular, I'm interested in this block. I.e. if the panel height is less than the chart window, and if its Y point (upper left corner) is lower than the difference between the window height and the panel height, corrected by 2 pixels, then the upper point of the panel will be assigned the value of this difference. Why is it like this, what is the point?
In short, it is because of the CDashboard::Move(int x, int y) method that the sticking occurs. When you try to move the panel after changing the chart size, it constantly corrects the coordinates and does not allow you to move the panel window freely...