Errors, bugs, questions - page 1128
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
In "normal" comparisons, it is given to the unsigned type:
Then how do you explain it:
In the tested expression of the first loop, a variable of int type is compared to an integer constant of uint type:
there is no implicit type conversion, a bitwise comparison is performed. The expression is always true.
In the second loop's expression being checked, a variable of the int type is compared to a variable of the uint type:
an implicit conversion of the variable i to the type uint is performed. And after the overflow of the i variable: uint(-1)= 4294967295
the expression will be false.
The end of an era(UNIX?)is delayed by 8 hours:
Whole types
Type
Size in bytes
Minimum value
Maximum value
Analog in C++
datetime
8
0 (1970.01.01 0:00:00)
32 535 244 799 (3000.12.31 23:59:59)
__time64_t
Developers,
Give him a formal description of the MQL grammar, let him look for boogers :-)))
Simple thing:
double min,max;
i=Bars-1-period1;
while(max-min==0)
{
min=Low[i];
max=High[i];
i++;
}
On TF: D1 and M4 the debugger rejects the line min=Low[i]; the terminal "hangs". On other TF this problem does not exist. Replacing by min=iLow(); does not do anything. Please, advise, where is the "hole": in the history, in the new MT4 editor or in my head?
Simple stuff:
On TF: D1 and M4 the debugger rejects the line min=Low[i];, the terminal "hangs". On other TF this problem does not exist. Replacement on min=iLow(); does not give me anything. Please, advise where is the "hole": in history, in new MT4 editor or in my head?
Pleaseuse the "SRC" button when creating a forum post to insert the code
This will make it easier to read your messages.
Forum on trading, automated trading systems and trading strategies testing
How to compile this code on MT5
barabashkakvn, 2014.04.09 11:09
Here is a good article:Migration from MQL4 to MQL5
The end of an era(UNIX?)is delayed by 8 hours:
Or we don't know something, I think someone even hand-counted it here https://www.mql5.com/en/forum/16036
Apparently there is an error in help max=32'535'215'999
It's just that the limit for datetime type is not defined correctly:
The limit for datetime type is simply not defined correctly: