I want to check the Horizontal Line area

 

I want to use ObjectFind to check the price area where i can draw the horizontal line is not occupied by another object. I want to do it for an price area and not a particular price

How can i do that?

 
Arpit T:

I want to use ObjectFind to check the price area where i can draw the horizontal line is not occupied by another object. I want to do it for an price area and not a particular price

How can i do that?

Hello. Iterate all objects on chart(ObjectTotal, ObjectGet, ObjectName, ...) and find the maximum YDistance value:

OBJPROP_YDISTANCE

The distance in pixels along the Y axis from the binding corner (see note)

int

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Properties
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Properties
  • www.mql5.com
Object Properties - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5