Need explanation for Bar Shift

 

Hi all,

I am building an indicator that prints london open / close / high /range and other things on my chart.

let's say we're at 12:00 and london open is at 08:00. To get the open price of london open there are few ways to do that:

int open1= iMA(NULL,PERIOD_H1,4,test1,MODE_SMA,PRICE_OPEN,0);

other way to do that is:

double Open[4];

another way also:

iOpen(NULL,PERIOD_H1,4);

All of these methods would give me london open price. Now the problem is that once we're at 13:00 , they will give me the open price ay 09:00 and not 08:00 (which is what I want)

In other ways, at 13:00 the shift should change to 5 instead of 4.

Anybody can help me with this?

tc

Reason: