This depends on the object type.
See here:
https://www.mql5.com/de/docs/constants/objectconstants/enum_object_property
Some have an achor point which can be queried just as you tried, others have coordinates.
- www.mql5.com
the object is one that uses x y cordinates.
I have figured out the solution though for getting the price of x y coordinates the following is how I did it:
double x = ObjectGet("test",OBJPROP_XDISTANCE); double y = ObjectGet("test",OBJPROP_YDISTANCE); //below are the 3 variables set to recieve the output from the function int window; datetime time; double price; ChartXYToTimePrice(0,(int)x,(int)y,window,time,price); Alert(price);
it is an
not sure if there is a better way to get the price rather then the way I have figured out.
Please share if you have another way
Cheers
This depends on the object type.
See here:
https://www.mql5.com/de/docs/constants/objectconstants/enum_object_property
Some have an achor point which can be queried just as you tried, others have coordinates.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Does anyone know how to get the Value of the x y anchor point?
I have tried using the following
double AnchorPrice = ObjectGetDouble(0,"test",OBJPROP_PRICE,0);
Thanks