How to Get Price Coordinate of Horizontal Line?

 
Greetings, I am trying to figure out how to get the price of a horizontal line. E.g. my program is to iterate through all horizontal lines and collect their prices I.e. int obj_total=ObjectsTotal(); for(int i=0;iobj_total;i++){ if(ObjectType(name)==OBJ_HLINE){ //obtaining the price of the line ??? } Thank you in advance
 
False alarm, guys, already found: ObjectGet(name, OBJPROP_PRICE1)
 
manul wrote >>
False alarm, guys, already found: ObjectGet(name, OBJPROP_PRICE1)
Hello, manul .
I have the same questions of you, to figure out how to get the price of a horizontal line, but I don't know to program.
I read the help window but I can not implement it.

Could you say me which is the way to get this orders you have found in the program, once I start a session, step by step.
It would be very useful for my.
If I can help you...
A greeting.
 
LESS: , but I don't know to program.
You have only four choices: We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using SRC) and the nature of your problem.
          No free help
          urgent help.
 

I come across the same problem and it works not for me in .mql4 after dragging.


ObjectGetDouble(0,name,OBJPROP_PRICE,0);
ObjectGetDouble(0,name,OBJPROP_PRICE1,0);
ObjectGetDouble(0,name,OBJPROP_PRICE2,0);

None of these calls provide the correct price. OBJ_PRICE and OBJ_PRICE1 provide the initial price at creation, but not the price when line has been dragged.

Is it possible to query price/y coordinate when line already has been dragged ?


Thank you community

 
chinaski:

I come across the same problem and it works not for me in .mql4 after dragging.

None of these calls provide the correct price. OBJ_PRICE and OBJ_PRICE1 provide the initial price at creation, but not the price when line has been dragged.

Do you try to catch it in OnChartEvent() by CHARTEVENT_OBJECT_DRAG ? In this case could be update of the object in the chart queue and you get the non-updated data. Have you tried to call ChartRedraw() before ObjectGetDouble() ?
ChartRedraw(0);
ObjectGetDouble(0,name,OBJPROP_PRICE,0);
 
Usefull information, thanks guys
Reason: