What's on the screen at a given time

 

Hi MQLers,

 with a couple of trendlines on charts, am I able to do, in a possibly simple way, something like: "at 13:20:30, what trendlines can I still see"?

Mac 

 
Martinigue:

Hi MQLers,

 with a couple of trendlines on charts, am I able to do, in a possibly simple way, something like: "at 13:20:30, what trendlines can I still see"?

Mac 

Simple is in the eye of the coder . . .

You need to look at all the Objects and find their datetime positions,  then you can determine if they are shown on the chart in it's current position. 

 
RaptorUK:

Simple is in the eye of the coder . . .

You need to look at all the Objects and find their datetime positions,  then you can determine if they are shown on the chart in it's current position. 


Of course I was thinking in this direction, just wanted to make sure if that is the only way to achieve the same result. 

Thanks, Raptor! 

 
    top     = WindowPriceMax();
    bot     = WindowPriceMin();
    iLeft   = WindowFirstVisibleBar();
    iRight  = iLeft-WindowBarsPerChart();
    if (iRight < 0) iRight = 0;                             // Chart is shifted.