Sliding window

 

Hello,

I've like to create an indicator which uses a sliding window and displays some horizontal lines on the screen from period - 1440 to period, where period is 3/4 is the last candle of the screen displayed candles but I know know how I will code this.

I've produced this screen image to demonstrate what I mean. In this example the vertical red line shows where period is (the point up to where I'd like to show the lines) and the sliding window terminates at period - 1440 candles (off screen to the left).

Period - 1440 to Period (line)

The thing I need to know is: How to get the time at the 3/4 mark of the visible screen?

Thanks in advance.

 
imamushroom: The thing I need to know is: How to get the time at the 3/4 mark of the visible screen?
  1. The candle starts at Time[0]
  2. The candle ends at Time[0] + PeriodSeconds()
  3. Do the math.
 
William Roeder:
  1. The candle starts at Time[0]
  2. The candle ends at Time[0] + PeriodSeconds()
  3. Do the math.

Time[0] is the first candle to the very right of the screen at current time. I'm referring to historical data where Time[0] is off the screen and I need Time[x] which is 3/4 along the currently show screen. Or have I misunderstood something?

 

Now I understand. Just get the visible indexes.
          Chart Price Max/Min - MQL4 programming forum

 
William Roeder:

Now I understand. Just get the visible indexes.
          Chart Price Max/Min - MQL4 programming forum

Thanks!

 
imamushroom:

Thanks!

One question, what's 

pips2dbl

please ?

 
Size of one PIP