I had a strange one this morning. I don't know if anyone can throw any light on it?
Early this morning (approx 0600GMT), my EA was calculating a weekly pivot value for the start of the new week. This has always worked before but this time my calculation (see below) resulted in zero?
gdWeekPivot = (iHigh(NULL, PERIOD_W1, 1) + iLow(NULL, PERIOD_W1, 1) +
iClose(NULL, PERIOD_W1, 1) + iOpen(NULL, PERIOD_W1, 0)) / 4;
There were no errors/disconnections on the journal or log. The chart looked fine (with the new weekly bar showing) but the result which shows in the expert log was definately zero. As soon as I spotted it I restarted the EA and it was fine again.
This is on a live (classic) account with Alpari UK. If I hadn't of spotted it my EA would have probably made a losing trade which is worrying. I do have lots of error handling but some things you kinda rely on. If I can't rely on an iLow or iHigh what hope is there!
Has anyone had this before? Any ideas?
Thanks
Early this morning (approx 0600GMT), my EA was calculating a weekly pivot value for the start of the new week. This has always worked before but this time my calculation (see below) resulted in zero?
gdWeekPivot = (iHigh(NULL, PERIOD_W1, 1) + iLow(NULL, PERIOD_W1, 1) +
iClose(NULL, PERIOD_W1, 1) + iOpen(NULL, PERIOD_W1, 0)) / 4;
There were no errors/disconnections on the journal or log. The chart looked fine (with the new weekly bar showing) but the result which shows in the expert log was definately zero. As soon as I spotted it I restarted the EA and it was fine again.
This is on a live (classic) account with Alpari UK. If I hadn't of spotted it my EA would have probably made a losing trade which is worrying. I do have lots of error handling but some things you kinda rely on. If I can't rely on an iLow or iHigh what hope is there!
Has anyone had this before? Any ideas?
Thanks