How do you get the bounding rectangle of an indicator.

 
How do you get the bounding rectangle of and indicator whose property is separate_window?  

I need this so I can use a DLL to draw inside the indicator rectangle instead of the whole client area of the chart window.
 

It is impossible.

With DLL You can analyze DC (device context of window) for horizontal line with different color

See for example "how to determine chart's background color"

 
Thank you.