Errors, bugs, questions - page 2888
![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
Can you tell me please!
Why isn't the server time updated when new ticks come in?
At the moment when EA starts, everything works as it should, but then the time goes, but new value of the current minute does not come into the variable.
I.e., the Expert Advisor works depending on the number obtained in the variable int M = TimeMinute(TimeCurrent());
Actually this code line is from the reference and it doesn't work.
For example, I start it at 12 - the current time returned by the server corresponds to the time in the variable, but the variable still stays at 12, although it is already 15-20 minutes on the clock
TimeMinute() is not available in MQL5.
Questions on MQL4 should be posted in the corresponding MetaTrader 4 branch.
If you want a cross-platform solution, use MqlDateTime.
but that's fine:
what's the fundamental difference?
That's a rather dubious warning:
but that's fine:
what's the fundamental difference?
Correct warning. The variable j is not initialized before its first use, when the variable i is assigned a value of j.
And in the second variant, the j variable is assigned the value i+1 and only then i = j
This is how it should be without a warning, but it hasn't been tested...
Correct warning.
for the alternatively gifted, these are identical loops
So what, this identity of loops allows the use of unidentified variables?
So what, this identity of loops allows the use of unidentified variables?
If the loops are identical, then the compiler behaviour should be the same, and it is different. That's where the error lies. You've explained why there is a warning in case (1), then explain why there isn't one in case (2) ? What has changed in principle? And then, if an uninitialized variable is used, why is the final result right when executing the code?
There is such a science - logic. If A and B are the same and A is red, then B should also be red, not green
If the loops are the same, then the compiler behaviour should be the same, and it is different. This is where the error lies. You explained why there is a warning in case (1), then explain why there isn't one in case (2) ? What has changed in principle? And then, if an uninitialized variable is used, why is the final result right when executing the code?
There is such a science - logic. If A and B are the same and A is red, B must also be red, not green.
There is no random number there. There is a zero there.
MQ has fixed it too ))
There is no random number there. There's a zero there.
MQ has fixed that too ))
First you need to check - then "bullshit".
Result: -2052256859
You need to check first - then "talk rubbish".
Result: -2052256859
Maybe it's because I have the test terminal installed on VirtualBox
Also, the compiler doesn't warn that the variable is not initialized.
But it warns like this
Probably because I have the test terminal installed on VirtualBox
You have a random number 0, I have 540016640
but they're still random numbers.