Attach CCanvas object to chart object and adapt to scaling

 

Hi guys,

 

So here's what i want to do: I want to create an indicator which shows the bars of the higher timeframe in the current timeframe. those higher timeframe bars should be painted behind the current timeframe bars and they should be translucent.

 

Now if i just draw rectangles with ObjectCreate and time/price based coordinates, i can't make them translucent, do i? now i tried out the CCanvas class and created an object with CreateBitmap. The problem here is, that it has a fixed width and height which isn't scaled at all when i scale time and price.

 

Is there a way so that i can create a translucent rectangle which attaches to time and price coordinates on both ends and scales accordingly?

 

Thank you very much!