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.
![Dokumentation zu MQL5: Konstanten, Enumerationen und Strukturen / Objektkonstanten / Objekteigenschaften Dokumentation zu MQL5: Konstanten, Enumerationen und Strukturen / Objektkonstanten / Objekteigenschaften](https://c.mql5.com/36/53/dokumentation-zu-mql5-konstanten__1.png)
- 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.
![Dokumentation zu MQL5: Konstanten, Enumerationen und Strukturen / Objektkonstanten / Objekttypen / OBJ_LABEL Dokumentation zu MQL5: Konstanten, Enumerationen und Strukturen / Objektkonstanten / Objekttypen / OBJ_LABEL](https://c.mql5.com/36/53/dokumentation-zu-mql5-konstanten__2.png)
- www.mql5.com
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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