Lots of ways:
*Create a variable which exits the start() while true. When you exit a position, set that variable to true.
*Issue a mql4 un-friendly command like 1/0 (Zero-Divide).
Other more creative and better ways could be found by Searching the forum.
void RemoveEA() //Don't forget to use #include <WinUser32.mqh> for this function { int h = WindowHandle(Symbol(), Period()); if (h != 0) PostMessageA(h, WM_COMMAND, 33050, 0); } //found this in the forum somewhere
Thanks for the fast answer. I will try that.
Cheers!
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
Hello
I would like my EA to shut down when the EA exit a position
Is that possible?
Cheers!