int time = Time[index];
I tried that and got the following warning; "possible loss of data due to type conversion".
i tried it in both versions (B509 & B604) & gives me the same result (i dont c any loss of data)
I don't see any loss of data either. I just want to write it so that I have no warnings.
long a = Time[index]; //or ulong
I'm not yet familiar with long or ulong. These are new to me.
bushTrader:
I'm not yet familiar with long or ulong. These are new to me.
The size of the long type is 8 bytes (64 bits). The minimum value is -9 223 372 036 854 775 808, the maximum value is 9 223 372 036 854 775 807.
The ulong type also occupies 8 bytes and can store values from 0 to 18 446 744 073 709 551 615.
whatever, this is the solution, (no warnings no errors)
Many thanks, your right, it works, though I'm not sure why yet. I'll study the MQL4 Reference some more.
bushTrader:
Many thanks, your right, it works, though I'm not sure why yet. I'll study the MQL4 Reference some more.
Many thanks, your right, it works, though I'm not sure why yet. I'll study the MQL4 Reference some more.
Do it properly, use the correct variable type . . .
datetime a = Time[index];
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
Even though I have been writing code in mql4 for many years, I will have to confess that I am stumped on some of these new changes since build 509.
I have been using a "string name" + Time[index] to name objects on my charts. However, instead of Time[index] giving the number of seconds,
it gives the time in a text. I need the number of seconds like in build 509. Any help would be appreciated greatly.