Challenges implementing MT5 published example code for CPanelDialog example

 

Hello,

I've reviewed and begun testing the code and suggestions in this article:  https://www.mql5.com/en/articles/345

I'm using the panel with an indicator, exactly as the sample code.

Before I try to expand upon this example for my own use, I need to resolve some major behavior problems.  I've done some searching in the forums but have not found what I'm looking for.  If anyone can point me to solutions or explain them here it would be greatly appreciated.  Here are the minor and major behavior problems I need to solve before I can confidently dedicate time to leveraging the approach in the above article:

1) SOLVED: Clicking the upper right close box [x] will not remove the panel until (sometimes) I right click on the chart and choose Refresh

2) NOT SOLVED: Deleting the indicator from the indicator list closes the entire chart

3) NOT SOLVED: Switching timeframes closes the entire chart

If someone could help me resolve these basic issues, I feel confident I could continue the research/education I need on this subject myself.  Is this an built-in problem with the use of the class?  Or just some deficiencies in the code example?

Thank you very much.


UPDATE: ====================================

I have resolved #1 by creating my own Destroy() method in my subclass, and executing ChartRedraw() when reason==0 after calling the parent class method.  Not sure why their code does not do this but this solved #1

I have TRIED to trap for reason codes on Destroy() and OnChartEvent() and OnDeInit() but none of those events seem to fire when changing timeframes.

I have tried to create a ChartEvent() method in my subclass, but Print() statements in it don't seem to fire -- if the method is firing at all.

#2 and #3 still serious problems.

Create Your Own Graphical Panels in MQL5
Create Your Own Graphical Panels in MQL5
  • www.mql5.com
The MQL5 program usability is determined by both its rich functionality and an elaborate graphical user interface. Visual perception is sometimes more important than fast and stable operation. Here is a step-by-step guide to creating display panels on the basis of the Standard Library classes on your own.
 
Still hoping for some direction on this.... anyone knowledgeable about this topic?
 
Each article has its own discussion thread, Go to discussion
Discussion of article "Create Your Own Graphical Panels in MQL5"
Discussion of article "Create Your Own Graphical Panels in MQL5"
  • 2012.02.07
  • www.mql5.com
New article Create Your Own Graphical Panels in MQL5 is published: Author: MetaQuotes...
 
Vladimir Karputov #:
Each article has its own discussion thread, Go to discussion

Thank you Vladimir I will check it out!  I appreciate the pointer :)

Reason: