iBarShift returns -1 . . but it shouldn't !
The first time you reference another chart (pair & TF) that's not already open, you get an error: ERR_HISTORY_WILL_UPDATED 4066 Requested history data in updating state.
next time capture getLastError and then print.
RaptorUK:
It's on the same chart,
It's on the same chart,
OpenBar = iBarShift(NULL, PERIOD_M1, OrderOpenTime()); 14:21:05 OBTraderV2T EURUSD,H1: OpenBar = -1Not the same chart M1 != H1
WHRoeder:
Not the same chart M1 != H1
Not the same chart M1 != H1
OK, I'm with you :-)
OK, before you all jump in . . . I know iBarShift CAN return -1 if I set exact to true and there is not an exact match . . but I didn't . . . here is my code.
. . . and the output from the log . . .
14:21:05 OBTraderV2T EURUSD,H1: OpenBar = -1 OpenTime: 2011.08.05 15:23
The only thing I could think happened is that I was missing the M1 15:23 bar and the current M1 bar was the 15:22 bar . . .