karp wak:
ExpertRemove().
I am looking for something that allows me to kill the thread of the program when an error occurs.
Something like "exit(-1)" in C and C ++.
Can you please tell me if there is something similar in MQL5?
I want to do something like what you can see in the following code:
karp wak: I am looking for something that allows me to kill the thread of the program when an error occurs. Something like "exit(-1)" in C and C ++. Can you please tell me if there is something similar in MQL5? I want to do something like what you can see in the following code:
Besides the answer from Alain about using ExpertRemove(), If you are doing that in the OnInit() handler, then exit properly with a return and a INIT_FAILED exit code, instead.
Alain Verleyen:
ExpertRemove().
ExpertRemove().
Thank you very much Alan !!
Fernando Carreiro:
Besides the answer from Alain about using ExpertRemove(), If you are doing that in the OnInit() handler, then exit properly with a return and a INIT_FAILED exit code, instead.
Besides the answer from Alain about using ExpertRemove(), If you are doing that in the OnInit() handler, then exit properly with a return and a INIT_FAILED exit code, instead.
Thank you very much Fernando !!

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
I am looking for something that allows me to kill the thread of the program when an error occurs.
Something like "exit(-1)" in C and C ++.
Can you please tell me if there is something similar in MQL5?
I want to do something like what you can see in the following code: