Flood19:
Hi,
I'm trying to display a .bmp file in a chart (not relative to a time/price, but to its coordinates from the top-left corner).
I have tried this script https://docs.mql4.com/constants/objectconstants/enum_object/obj_bitmap_label but haven't managed to get it working. I got my file, called "30x28.bmp" in the Images folder from the data folder.
This is my current try:
Any help would be appreciated. Thank you.
You need to set the modifier parameter :
ObjectSetString(0, "logo", OBJPROP_BMPFILE, 0, "\\Images\\30x28.bmp");
Thanks you, got it working. I had that missing, but I think my .bmp file was in another format (I think it was the color depth, 24 vs 32) as well, got it working by overriding it via Paint... Thank you again!
Doerk:
If you want, check the code base for my uploads. There is a modified version of CCanvas which also supports bitmaps which are loaded as resources. By this, you don´t need to distribute the bitmap separately, you rather may include it into the EX4/EX5 file.
Here is your "product" https://www.mql5.com/en/code/13936
If you want, check the code base for my uploads. There is a modified version of CCanvas which also supports bitmaps which are loaded as resources. By this, you don´t need to distribute the bitmap separately, you rather may include it into the EX4/EX5 file.
Maybe, yes. I am not sure if I didn't upload a second one for CCanvas separately.
And uhm thank you, Alain :)
Is it possible to use an image from the web instead of one that is stored locally using the above method? I tried to simply change the position to "http://www.******.com/test/image.bmp" but no success of course..
KingOfSand:
Is it possible to use an image from the web instead of one that is stored locally using the above method? I tried to simply change the position to "http://www.******.com/test/image.bmp" but no success of course..
Yes, but you have to download the image, using something like WebRequest(); save it as a file; and then display the image as above. You can't set OBJPROP_BMPFILE to a URL.
Is it possible to use an image from the web instead of one that is stored locally using the above method? I tried to simply change the position to "http://www.******.com/test/image.bmp" but no success of course..
Very nice article .. Need to add the code to make the image at the background .. so can anyone help please
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
Hi,
I'm trying to display a .bmp file in a chart (not relative to a time/price, but to its coordinates from the top-left corner).
I have tried this script https://docs.mql4.com/constants/objectconstants/enum_object/obj_bitmap_label but haven't managed to get it working. I got my file, called "30x28.bmp" in the Images folder from the data folder.
This is my current try:
Any help would be appreciated. Thank you.