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
Obviously the Canvas (BitMap) is redrawn/copied in its entirety, but only the labels have changed. Why should I be surprised?
Canvas is just convenient and moderately fast.
And without any comparative tests it's obvious that simple label will output text faster.
Of course, I knew it before. But I was convinced that using Kanvas is the fastest way to output. At the same time, it was terribly slow in the tester (when outputting data of an Expert Advisor being tested), especially on ticks. Using labels fixed the situation, of course. So I decided to find out how slow Kanvas really is compared to Labels. It turns out to be 321 times slower, if this measurement is to be believed.
Of course, I knew that before. But I was convinced that using Kanvas was the fastest way of output. However, in the tester (when outputting data of the EA under test) it was terribly slow, especially on ticks. Using labels fixed the situation, of course. So I decided to find out how slow Kanvas really is in comparison with Labels. It turns out 321 times, if this measurement is to be believed.
Well, aren't there a lot of fantasy storytellers in the world?
Aren't there many fantasy storytellers in the world?
That's for sure!
Obviously the Canvas (BitMap) is redrawn/copied in its entirety, but only the labels have changed. Why should I be surprised?
Canvas is just easy to use and moderately fast.
Why redraw the whole bitmap?
to prove it's slower than redrawing the label?
For a proper comparison, you should also redraw only part of the bitmap, the size of the marker.
Why redraw the whole bitmap?
to prove that it is slower than redrawing the label?
For proper comparison, you also need to redraw only part of the bitmap, the size of the label.
Actually this is how it updates:
all at once
this is actually how it's updated:
all at once.
does it refresh or does it redraw?
I've never seen a slowdown when refreshing.
so is it being updated or redrawn?
I've never seen any lags when updating.
If you've never seen brakes when working with OBJ_BITMAP_LABEL, it's important to say where. If when working in the terminal, yes. The delay is insignificant. But if you take the work in the tester and also Model: All ticks or OHLC on M1, the constant passing of the m_pixels array using ResourceCreate is very noticeable. Pixel operations are generally considered to be the most costly in any program.
this is actually how it's updated:
all at once
Eh, I remember that you could edit the canvas in the video buffer with a pixel, but it's so uninteresting(
There aren't many fantasy storytellers in the world, are there?
Dmitry, before you judge something you have to understand where it all started...
Forum on trading, automated trading systems and testing of trading strategies
Errors, bugs, questions
Mihail Matkovskij, 2021.03.07 14:02
Comment outputs lines of completely different length (visually) while their length is exactly the same
Code:
How can I output lines withComment, that visually they were of the same length? For example, I want to output a table that has three columns so that the columns are equally spaced vertically.
Dimitri, before judging something you need to understand where it all started...
Better make an example where a Canvas based display overtakes the display from Labels! Like, if you want to disprove my claims, then by the law of logic you have to prove the opposite. Will it work...?