In which window is this line?

 

Hi there.

I wonder if it is possible to find out if a object is in window 0 where the chart is or in 1,2,3... where the indys are. so I tried something with the PRICE1 coord but this doesn't work for all charts. Then I measure the distance of start and end which is also not valid for everything. What would you suggest?

 
There is a built-in function for it: https://docs.mql4.com/objects/ObjectFind
Reason: