Print("Last error on " + _Symbol + ": " + IntegerToString(GetLastError()) + ": " + ErrorDescription(GetLastError()));
You called GetLastError which cleared the error. Then you called it again and got no error.
Don't copy and paste code. Read it once into a variable and use the variable.
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
My code:
The log panel prints:
Last error on EURAUD: 4108: no error
I check up on the error code list:
https://docs.mql4.com/constants/errorswarnings/errorcodes
4108 ERR_INVALID_TICKET Invalid ticket
Is anyone here properly informed of such discrepancies? Maybe I'll have to write up my own function?
TIA