Errors, bugs, questions - page 2976
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Which drawback are you talking about?
I haven't investigated in detail why Kanvas might be slow, but I think it's for the same reason... The pixels in the array can't be selectively changed and given a redraw command. You make changes to the array first, and then you have to ResourceCreate. Which copies the pixels one by one and then, similarly, charts them out one by one and then updates the chart (ChartRedraw) some more. How many unnecessary operations... This will in any case kill the CPU load, when it's busy with useful data processing. While labels at least take less pixels (and hence output faster). And then, their output mechanism is completely inside the chart (no need to pass an array). Although I'm notentirely sure of their algorithm, I think they're faster. I used to make a text output panel based on a canvas. When visually testing the Expert Advisor with such a panel in the tester, I was not much impressed with the result. In addition to the EA's own load, the panel's redrawing was rather annoying. The panel is constantly being updated(ResourceCreate -ChartRedraw) on every tick. While I didn't notice such slowdowns with labels.
Either I'm a fool or the skis aren't moving? mt4 build 1320
I haven't worked out in detail why Kanvas might be slow, but I think it's for the same reason... The pixels in the array cannot be selectively changed and given a redraw command. You make changes to the array first, and then you have to ResourceCreate. Which copies the pixels one by one and then, similarly, charts them out one by one and then updates the chart (ChartRedraw) some more. How many unnecessary operations... This will in any case kill the processor load when it's busy with useful data processing. While labels at least take less pixels (and hence output faster). And then, their output mechanism is entirely within the chart (no need to pass an array). Although I'm notentirely sure of their algorithm, I think they're faster. I used to make a text output panel based on a canvas. While visually testing the Expert Advisor with such a panel in the tester, I was not much impressed by the result. In addition to the EA's own load, the panel's redrawing was rather annoying. The panel is constantly being updated(ResourceCreate -ChartRedraw) on every tick. At the same time I've never noticed such slowdowns with labels.
I haven't worked out in detail why Kanvas might be slow, but I think it's for the same reason... The pixels in the array cannot be selectively changed and given a redraw command. You make changes to the array first, and then you have to ResourceCreate. Which copies the pixels one by one and then, similarly, charts them out one by one and then updates the chart (ChartRedraw) some more. How many unnecessary operations... This will in any case kill the processor load when it's busy with useful data processing. While labels at least take less pixels (and hence output faster). And then, their output mechanism is completely inside the chart (no need to pass an array ). Although I'm not entirely sure of their algorithm, I think they're faster. I used to make a text output panel based on a canvas. When visually testing the EA with such a panel in the tester, I was not much impressed with the result. In addition to the EA's own load, the panel's redrawing was rather annoying. There is a constant Update ( ResourceCreate - ChartRedraw ) on every tick. I didn't notice such slowdowns with labels.
@Ilyas
Compiler bug ? Build 2817.
It only seems to you.
How did you know that labels are based on canva, if canva itself is add-on of OBJ_BITMAP_LABEL and label is OBJ_LABEL?
While I've been chatting here on the forum, I've already sketched out the output panel on labels, with any given number of rows and columns. And for the canvas I have other tasks, in my other applications. And it works very well there too.
Please don't talk about what you don't know. @Nikolai Semko is absolutely right, and Canvas works quickly and without any problems or flaws.
So you probably know everything? Then maybe share your knowledge or links where you can read about charting in MetaTrader so I know what you know too? :)
@Ilyas
Compiler bug ? Build 2817.
In MQL, const is not const at all. In fact, constcan only bewritten through a macro
In MQL, const is not const at all. In fact const can only be written through a macro
Yes so it is an error :-D
Note that this is not in one case, but in all (1) (2) (3) (4) it is designed this way: with (*) there will be an error, but with (**) it is OK. I.e. constants are missing as an entity
Note that this is not in one case, but in all (1) (2) (3) (4) it is designed this way: with (*) there will be an error, but with (**) it is OK. I.e. constants are missing as an entity