You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
OK, maybe not typecasting . . . maybe a memory issue.
Agree. Because the ACR data structure is a bit of a fudge (making datetime look like doubles), I think the MQL expression parser is getting confused.
Agree. Because the ACR data structure is a bit of a fudge (making datetime look like doubles), I think the MQL expression parser is getting confused.
Anyway it's a bug. Did you report it to the Service Desk ?
Nope, I have a workaround :) I will next time I find myself logging onto mql5 site..
EDIT: Reported now !
Here is the response from the Support Team, no acknowledgement of the bug, and tell me to go learn about doubles! ( not sure why I bothered....)
From Support Team:
Here is the response from the Support Team, no acknowledgement of the bug, and tell me to go learn about doubles! ( not sure why I bothered....)
From Support Team:
Here is the response from the Support Team, no acknowledgement of the bug, and tell me to go learn about doubles! ( not sure why I bothered....)
From Support Team:
Perhaps the ideal solution to this kind of issue would be to cover this kind of anomaly in the documentation . . . assuming it can't be fixed to work as expected.
Thats a strange bug, you shouldnt even need to typecast datetimes to perform calculations on them. Is it bad practice to treat datetimes as integers ?
output:
2013.09.18 20:18:18 test EURUSD,M1: Alert: Time[0] - Time[1] = 60
2013.09.18 20:18:18 test EURUSD,M1: Alert: Time[1] = 1379564220
2013.09.18 20:18:18 test EURUSD,M1: Alert: Time[0] = 1379564280
Now an ArrayCopyRates test
output:
2013.09.18 20:48:36 arraycopyrates test EURUSD,M1: Alert: d1 - d2 = 60 //calculation works fine when values are copied out of the array into integers.
2013.09.18 20:48:36 arraycopyrates test EURUSD,M1: Alert: array[0][0] - array[0][1] = 0 //calculation directly on array values returns zero as reported by ydrol
2013.09.18 20:48:36 arraycopyrates test EURUSD,M1: Alert: array[1][0] = 1379566020
2013.09.18 20:48:36 arraycopyrates test EURUSD,M1: Alert: array[0][0] = 1379566080 // array does contain correct values