The error in my case is broadcast by the Expert Advisor in the Experts tab.
Natalia's Expert Advisor does not broadcast the error. The reason is to check if the boolean value is less than zero.
If there is a closing error, the result of the function will be false, which is zero.
You check for -1 - i.e., to true, respectively, it does not output your error descriptions (not error handling, but simply their description in Russian).
And there is one more error - when selecting an order by ticket, before closing it, we should check that its OrderCloseTime() is equal to zero. If it is equal, then close it, if it is not, then the order is already closed.
It's a pity you are teaching people with such knowledge...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Renat Akhtyamov:
...
The error in my case is broadcast by the Expert Advisor in the Experts tab.
Natalia's Expert Advisor does not broadcast the error. The reason is to check if the boolean value is less than zero.
If there is a closing error, the result of the function will be false, which is zero.
You check for -1 - i.e., to true, respectively, it does not output your error descriptions (not error handling, but simply their description in Russian).
And there is one more error - when selecting an order by ticket, before closing it, we should check that its OrderCloseTime() is equal to zero. If it is equal, then close it, if it is not, then the order is already closed.
It's a pity you are teaching people with such knowledge...
-1 is true
Learn it all the same...
Artem, don't start)) There'll be another 5 pages of useless discussion ))