How to caption a vertical line

 

Hello Everybody,

i've added VLINES with my Indicator ... i wanna caption them so you can see where it referes to. i've added Text vertically nearby the lines (see pic) ... however, the text captions move when shown price range changes.

What would be the best way to caption the lines so that the text always stays on the ceiling of the window ...

thanks

Jacob

 
haemse:

What would be the best way to caption the lines so that the text always stays on the ceiling of the window ...

I think what you want to do for your text is specify the Y coordinate in pixels and an X coordinate in time . . . I don't think you can do that.
 
haemse:
What would be the best way to caption the lines so that the text always stays on the ceiling of the window ...
  1.         double  bottom      =         WindowPriceMin(),
                    top         = MathMax(WindowPriceMax(), bottom+pips2dbl),// Div0
            int     iVisible    =           WindowFirstVisibleBar(),
                    iVisEnd     = MathMaxI( iVisible-WindowBarsPerChart(),0);// Shft
    
    Each tick, move all captions between iVisible through iVisEnd to the top - 5% or so.
  2. Personally I'd put them just some amount above the high of the candle and never redraw.
 

WHRoeder:

2. Personally I'd put them just some amount above the high of the candle and never redraw.
Me too.
 

WHRoeder:

2. Personally I'd put them just some amount above the high of the candle and never redraw.


Thanks, i think thats what i wanna do :-)

The prob with option one is, that when you scroll around in the chart price range (Y) changes all the time and they would disappear again ...

thx for the hint ...

 
haemse:
The prob with option one is, that when you scroll around in the chart price range (Y) changes all the time and they would disappear again ...
I did say, you have to move them each tick.
Reason: