Do you have a solution for the flickering problem encountered when writing ZIGZAG type indicators on MT5? Is it a logic problem for MT5 to render the indicator buffer? - page 2

 
Fernando Carreiro #:
I use DRAW_SECTION on many of my indicators, and I have no such issue (MT4 or MT5).

It will not be a code problem. In the past, I simply added the control display in the calculation part of the official ZIGZAG code, and simply added the ObjectCreate, ObjectFind and other operations of the control to flicker. Of course, there is another problem, that is, in The CPU overhead of ObjectFind in MT5 is very large, far greater than that of MT4.

 



It's very simple, just add the display of these two Objects, and it will flicker when OnCalculate runs.

As I mentioned at the beginning of today, the one that does not contain any OBject just has enough calculations, and it will keep flickering.

 
Kaijun Wang #: It will not be a code problem. In the past, I simply added the control display in the calculation part of the official ZIGZAG code, and simply added the ObjectCreate, ObjectFind and other operations of the control to flicker. Of course, there is another problem, that is, in The CPU overhead of ObjectFind in MT5 is very large, far greater than that of MT4.

Both "ZigZag.mq5" and "ZigZagColour.mq5" work correctly without any flickering issue.

If you started having the issue when you added to their code, then it seems obvious that it is the code changes that are the cause.

 
Kaijun Wang #: It's very simple, just add the display of these two Objects, and it will flicker when OnCalculate runs. As I mentioned at the beginning of today, the one that does not contain any OBject just has enough calculations, and it will keep flickering.
Please provide a example code that recreates the issue, so then we can run tests and identify the cause.
 
Fernando Carreiro #:

Both "ZigZag.mq5" and "ZigZagColour.mq5" work correctly without any flickering issue.

If you started having the issue when you added to their code, then it seems obvious that it is the code changes that are the cause.

Please provide a example code that recreates the issue, so then we can run tests and identify the cause.

Only when the calculation exceeds a certain value, it will blink.

I can give you the code where I added the OBJECTS, it's no problem, hope MQL5 is getting better and better.

 
Fernando Carreiro #:
Please provide a example code that recreates the issue, so then we can run tests and identify the cause.

A very simple change has been made. It does not involve any operations on BUFFER.

 
Fernando Carreiro #:
Please provide a example code that recreates the issue, so then we can run tests and identify the cause.

As for the indicators mentioned at the beginning, I will not provide them when it comes to the confidentiality of the algorithm.

 
Kaijun Wang #: As for the indicators mentioned at the beginning, I will not provide them when it comes to the confidentiality of the algorithm.

I did not request your original code. I requested an "example" which would recreate the issue.

 
Kaijun Wang #: A very simple change has been made. It does not involve any operations on BUFFER.

I will test it and get back to you shortly.

 
Kaijun Wang #: A very simple change has been made. It does not involve any operations on BUFFER.

I'm unable to recreate your issue. I don't get any flickering. Are there perhaps other conditions that need to be met that cause it?

Please click on image below to view GIF animation.