Thanks to everyone who is suggesting a solution. I need some time to test everything and apply it to my products. What can work on simple products, I need to test on more complex ones. The timer idea is really top. Doesn't solve all the problems, but it solves other issues I've encountered.
Not ignoring anyone. I'll be able to respond next week with what worked, what didn't.
Method for creating custom indicators whose drawings are made using the class CCanvas from standard library. The topics of this article are listed below:
In this article I'll introduce a method for creating custom indicators whose drawings are made using the class CCanvas from standard library and see charts properties for coordinates conversion. I'll approach specially indicators which need to fill the area between two lines using transparency.
Yeah, there's just one little undocumented nuance. If you use alpha-channel (COLOR_FORMAT_ARGB_NORMALIZE), you must fill it not with zeros before creating your bitmap.
otherwise the edges of the characters will be "jagged".
Thanks.
And thankyou for all your selfless work on Canvas.
I've learned alot and impementing canvas to to my non regular charts in mt4, (Renko for example) which has replaced thousands of chart-objects.
And thankyou for all your selfless work on Canvas.
I've learned alot and impementing canvas to to my non regular charts in mt4, (Renko for example) which has replaced thousands of chart-objects.
Thanks for the kind words.
Yes, thousands of objects start to incredibly slow down the interface. This is a serious oversight of MetaQuotes. A well-built canvas does not cause lags even with 10,000 virtual objects.
Forget about BMP files like a bad dream. With this library, you will now be able to use the more advanced and compact PNG image format for your programmes.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Thanks to everyone who is suggesting a solution. I need some time to test everything and apply it to my products. What can work on simple products, I need to test on more complex ones. The timer idea is really top. Doesn't solve all the problems, but it solves other issues I've encountered.
Not ignoring anyone. I'll be able to respond next week with what worked, what didn't.
Canvas based indicators: Filling channels with transparency
The topics of this article are listed below:
Yeah, there's just one little undocumented nuance.
If you use alpha-channel (COLOR_FORMAT_ARGB_NORMALIZE), you must fill it not with zeros before creating your bitmap.
otherwise the edges of the characters will be "jagged".
Thanks.
And thankyou for all your selfless work on Canvas.
I've learned alot and impementing canvas to to my non regular charts in mt4, (Renko for example) which has replaced thousands of chart-objects.
Thanks.
And thankyou for all your selfless work on Canvas.
I've learned alot and impementing canvas to to my non regular charts in mt4, (Renko for example) which has replaced thousands of chart-objects.
Thanks for the kind words.
Yes, thousands of objects start to incredibly slow down the interface.
This is a serious oversight of MetaQuotes.
A well-built canvas does not cause lags even with 10,000 virtual objects.
Code Base
PNG
Nikolai Semko, 2023.07.15 07:24
Forget about BMP files like a bad dream. With this library, you will now be able to use the more advanced and compact PNG image format for your programmes.I have finally implemented c PNG.
I got the implementation from @Zorro(https://www.mql5.com/ru/forum/92113#comment_2672596)
Check it out please. I haven't had any glitches so far.
Finally implemented c PNG.
.
Cool and useful. Just for interest, can it be used in MT4?
Cool and useful. Just out of interest, can this be used in MT4?
Nikolai, have you found somewhere ready code on kanvas that allows to scroll the window?
Nikolai, have you found somewhere ready code on kanvas that allows to scroll the window?
Anatoly and Pyotr had implementations
But I haven't used it. That's why I can't judge.