
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
You still haven't written how your suggestion will help improve MQL. so far it's just bare requests, which only you need, with an unclear purpose.
I already wrote in the beginning that MQL5 has that effect, while in MQL4 it can be improved by giving last_error visibility. Once again, I've solved the problem for the second time with two homemade functions. It's not last_error but rather first last error plus possibility of custom error codes as in MQL5.
This is not good, because if you had an error from a previous operation and did not handle it, then if there is no error in the current operation, you will handle the previous one.
Yes everything is ok if you do not call GetLastError but only from a function that returns a fake error and has already changed the code of a possible previous error to a new one!
Yes, everything is fine if you do not call GetLastError but only from a function that returns a fake error and has already changed the code of a possible previous error to a new one!
By checking the error in an additional function, you just null it. However, if you have code places where you don't check for an error but it might occur, you may run into an inappropriate error.
By checking the error in the additional function, you are clearing it.
No, I am not clearing it:
Can anyone recommend the Most Decent (in your opinion) error handling function?
Can anyone recommend the Most Decent (in your opinion) error handling function?
There's not much to choose ... make it with what you've got... or don't make an unconditional call to GetLastError
No, I don't reset it:
What is this?
last_error_fifo = GetLastError();
It's not really a choice ... make do with what we've got... or not to make an unconditional call to GetLastError
No, I'm not talking about the error information, I'm talking about the "correct behaviour" of the EA when an error occurs/detects an error.
What's this?
It's not unconditional zeroing but only if last_error_fifo == 0. In short, it's the same as eggs in profile. check what the function returned before checking for errors.
No, I'm not talking about the error information, I'm talking about the 'correct behaviour' of the EA when an error occurs/detects an error.
It depends on your logic. After all, you can handle every error, and you can only handle the ones that are important in a given situation.