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
Why would I want compatibility with mql5 ? I'm using mql4 code for MT4.
ResetLastError() before the StrToTime() call then call GetLastError() afterwards . . . StrToTime() shouldn't cause an error but it does . . . it's a bug. Something similar has already been acknowledged and fixed: https://www.mql5.com/en/forum/149475/page2
Is there anywhere in documentation written that StrToTime() uses error handler?
If not, than there is
1) No reason to check it
2) No reason to expect that the value returned has anything to do with result of StrToTime() function.
Also, what does err 4051 mean? Invalid lots amount?????
Is there anywhere in documentation written that StrToTime() uses error handler?
If not, than there is
1) No reason to check it
2) No reason to expect that the value returned has anything to do with result of StrToTime() function.
Also, what does err 4051 mean? Invalid lots amount?????
This error can be generated by many functions, even those that do not return a value.
Can you show me a reference in documentation where it is stated that StrToTime() uses error handler and that after the function is completed you should check for its success by calling GetLastError()?
anyway, there is one thing that we agree about, so lets rather make some noise about it:
Forcing that comments in EA source code after extern/input variables definition are visible as definition of variables in expert properties in strategy tester is arrogant, insolent and disrespectful towards programmers! MQ has no right to impose such rule and force users to waste time to change numerous lines of source and change commenting and source writing habits, in such a non-standard way. If they want such a non-standard behaviour, it should be implemented using #pragma directives, as this is the standard and accepted way.
Can you show me a reference in documentation where it is stated that StrToTime() uses error handler and that after the function is completed you should check for its success by calling GetLastError()?
A similar situation has already been fixed with TerminalInfoString() . . . as I already mentioned. But I get your point, if the user used GetLastError() correctly the "error" would never have been seen.
anyway, there is one thing that we agree about, so lets rather make some noise about it:
There is probably more than one thing we agree about