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
You are now a coder, so you must learn to think logically and learn to use the tools available to you.
So here is my take on things:
In the example given, do you see it using the properties OBJPROP_XDISTANCE or OBJPROP_YDISTANCE?
No, it does not! Do you even understand what those properties do or what they are for?
You are now a coder, so you must learn to think logically and learn to use the tools available to you.
So here is my take on things:
In the example given, do you see it using the properties OBJPROP_XDISTANCE or OBJPROP_YDISTANCE?
No, it does not! Do you even understand what those properties do or what they are for?
Hi FMIC,
Thank you very much for providing the guidance.
Sorry that I made mistake with xy distance. But added the condition as you suggested, now no error.
But object is still not showing up on the chart. I did checked the visibility scope as I already added xy offset and xy size.
If I open the object list on the chart, nothing shows until I click on the "list all". Then it shows an object in the object list.
As you yourself have verified, the "Chart Object" is there and appears in the object list. So what is wrong?
I read the help section . Ok I added both price & time. Note I already added the deinit part, I just didn't shared here. I shared only the start function in my last post. Correct size is used for the picture already. Picture is 150x150. So I used same size in here.
I added all parameters, Changed the coded many times to figure out it. But its still not showing any object on the chart.
I got one question do I need to move the object then it will show up as price time is changing?
Thanks.
PS: Sorry I don't want to keep coming back here with every little step. I tried searching for other post on same topic for a sample code. But it was difficult.
https://docs.mql4.com/constants/objectconstants/enum_object/obj_bitmap
I tried using the script code from the above site. Its working successfully. But not my code for a single instance.
I read the help section . Ok I added both price & time. Note I already added the deinit part, I just didn't shared here. I shared only the start function in my last post. Correct size is used for the picture already. Picture is 150x150. So I used same size in here.
I added all parameters, Changed the coded many times to figure out it. But its still not showing any object on the chart.
I got one question do I need to move the object then it will show up as price time is changing?
Thanks.
Think!
READ THE DOCUMENTATION: Essentially, the highlighted section is saying the following: ( XSIZE + XOFFSET ) <= Image Width and ( YSIZE + YOFFSET ) <= Image Height
Think!
READ THE DOCUMENTATION: Essentially, the highlighted section is saying the following: ( XSIZE + XOFFSET ) <= Image Width and ( YSIZE + YOFFSET ) <= Image Height
Thank you I adjusted it. Now problem solved & its showing the picture.
I have last question, can we add 2 Time coordinate & 2 price coordinate on the bitmap image?
One time & price coordinate get already added when we create the object, can we add more 1 price & 1 time coordinate on the same object? Just like what we can do for rectangles.
Regards
Thank you I adjusted it. Now problem solved & its showing the picture.
I have last question, can we add 2 Time coordinate & 2 price coordinate on the bitmap image?
One time & price coordinate get already added when we create the object, can we add more 1 price & 1 time coordinate on the same object? Just like what we can do for rectangles.
What would that accomplish? Again, you fail to read the documentation! A Bitmap, is NOT a rectangle! It only has one anchor point (not 2)! You cannot "stretch" it as a pixel only occupies a pixel (no more, no less).
PS! If you want to simulate an adjustable sized rectangle, then you should have a "very large" bitmap, and use the OBJPROP_XSIZE and OBJPROP_YSIZE so as to adjust the visible part and emulate a variable sized rectangle. You can use ChartTimePriceToXY() to get the pixel x,y coordinates of a second simulated anchor point, in order to calculate the delta size of the simulated rectangle to be used for the OBJPROP_XSIZE and OBJPROP_YSIZE.
In general terms, you're always going to run into problems with the colours of overlapping objects getting inverted, it's the default behaviour.
Whilst it's true that you can get around this to an extent by creating a mask for the overlapping colour, it's only going to be of benefit in fringe cases - where one object sits exactly inside another.
The only "true" solution to this is to use the CCanvas class with the appropriate colour mode, and draw rectangles using the appropriate methods.
In general terms, you're always going to run into problems with the colours of overlapping objects getting inverted, it's the default behaviour.
Whilst it's true that you can get around this to an extent by creating a mask for the overlapping colour, it's only going to be of benefit in fringe cases - where one object sits exactly inside another.
The only "true" solution to this is to use the CCanvas class with the appropriate colour mode, and draw rectangles using the appropriate methods.
@Hoodlum. With the level of coding skill that the OP has demonstrated (with this and several other threads of his) and the great difficulty he has had with the most basic of concepts, I do believe that OOP programming and the use of the CCanvas, is WAY BEYOND his reach and understanding at the moment.
It is true that I am junior coder that's why I had to look for support. I was working with Bitmap 1st time. But I will try learning CCanvas if it works to solve this problem.
Thank u for your generous support!