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
Unfortunately, in MQL4 there is no possibility to attach a resource as an array. But everything else works.
By the way, I have never been able to insert BMP with alpha channel in MQL4 when the image has transparency like png. It either doesn't show or doesn't compile.
There was a discussion here https://www.mql5.com/en/forum/157832 As a result, it is only suitable for MT5. But it is interesting that BMP exist with alpha channel.
It didn't work with PNG either... or didn't figure out how.
About canvas and scaling, Thanks, I will try it on mq4.
By the way, I have never been able to insert BMP with alpha channel in MQL4, when the image has transparency like png. It is either not shown or not compiled.
There was a discussion here https://www.mql5.com/en/forum/157832 As a result, it is only suitable for MT5. But it is interesting that BMPs exist with alpha channel.
It didn't work with PNG either... or didn't realise how.
About canvas and scaling, Thanks, I'll try it on mq4.
There is no blinking bug in MQL4.
Attached is the mql4 version.
There is no blinking bug in MQL4.
Attached is the mql4 version.
That's a fitting. Thank you!
At first I was happy, but now I am stumped. I can't load a file from outside through settings in the indicator, but not inside the compiled file.
Nikolai Semko, if you have time, please write if it is possible. And if you have an example with setting transparency and file selection, you can help me out.
At first I was happy, but now I am stumped. I can't load a file from outside through settings in the indicator, but not inside the compiled file.
Nikolai Semko, if you have time, please write if it is possible. And if you have an example with setting transparency and file selection, you will help me out.
*
Oops, I'm stupid. The second constructor that takes a file name has already been implemented. Then I don't see any difficulties at all.
At first I was happy, but now I am stumped. I can't load a file from outside through settings in the indicator, but not inside the compiled file.
Nikolai Semko, if you have time, please write if it is possible. And if you have an example with setting transparency and file selection, you can help me out.
here is a new version of CPng, which has the LoadPngFromFile() function.
I don't understand the difficulty in uploading a png
Indeed..., it's not always easy)
here is a new version of CPng, which has LoadPngFromFile() function.
Thanks, I will try it
I didn't understand, what is the difficulty to load png as uchar array and then nurture it to object of Png class.
I've figured out the external PNGs, loading, scaling, transparency works. But...
Is it even realistic to compile a PNG inside a file?
The standard functionality ...
#resource "\\Files\\123.png"
string nam_img = "::Files\\123.png"
... gives a compilation error
I didn't get into the fact that the software works with an external file, but how to make the whole final product to be one file?
Otherwise the practical sense of such a feature is lost. I have not tried it in MT5. In MT4 there is a connection error.
P.S. I assume that theoretically it is possible to write a script that will convert PNG into code and we will put it, say, in MQH and work with them as a part of one container. But I can't write such a script. Picture arrays are a blind forest for me.
External PNGs sorted out, loading, scaling, transparency works. But...
Is it even realistic to compile a PNG inside a file?
You can insert the file as an array and then access this array.
Attached an example
Is it even realistic to compile PNG inside a file?
Ask the developers to insert PNG here.
I'm sure they'll agree.