How to anchor a Rectangle to Y in pixels and X in time

 
Hi,

I want to draw a nice indicators of session opening times. I want to print them as rectangles at the bottom of the chart:

It would look something like this:


(candles above)

London : |||||||||||||||||||||___________________________________|||||||||||||||||||||||___________________________________
New York: __________________||||||||||||||||||||______________________________________|||||||||||||||||||||________________
Sydney : _______________________________________|||||||||||||||||||________________________________________||||||||||||||||
(edit, sorry, all spaces were removed so I'm using underscores, these spaces should be blank)

I got to the stage where I am drawing rectangles, but unfortunately they need to be anchored to Time and Price. I want only to use Time and I want to set fixed height for Price (in pixels from the bottom of the screen). For labels it is possible to use ObjectSet($object_name,OBJPROP_YDISTANCE,$y) but they don't get scrolled with the chart. I want my rectangles to move along with the candles.

How to use it in the way I did that here?
 
You could use WindowBarsPerChart and WindowFirstVisibleBar to get the range that is currently visible and then use Low[iLowest(...)] to find the lowest price of all the currently visible candles and place your rectangles a bit below that.

Or you could simply place your indicator display in a separate indicator window without having to worry about this at all.
Reason: