Find OHLC of exact time

 

For example, what was the High of the minute bar for 6:15 GMT on Wednesday, March 26, 2008 (EUR/USD)?

Or find info for a range, for example:

What was the Low between 10:00 - 15:00 EST on Thrusday, January 24, 2008(USD/JPY)?

 

To get the times zones you need to know the offset of that timezone from your chart time, in seconds.

For example, what was the High of the minute bar for 6:15 GMT on Wednesday, March 26, 2008 (EUR/USD)?

.

theHigh = iHigh(Symbol, PERIOD_M1, iBarShift(Symbol(), PERIOD_M1, offset+StrToTime("2008.03.26 06:15"));

.

What was the Low between 10:00 - 15:00 EST on Thrusday, January 24, 2008(USD/JPY)?

.

theLow = iLow(Symbol, PERIOD_H1, iLowest(Symbol(), PERIOD_H1, MODE_LOW, iBarShift(Symbol(), PERIOD_H1, offset+StrToTime("2008.01.24 10:00") - iBarShift(Symbol(), PERIOD_H1, offset+StrToTime("2008.01.24 15:00"), iBarShift(Symbol(), PERIOD_H1, offset+StrToTime("2008.01.24 15:00"));

.

Reason: