Happy New Year to everyone!
I want to turn off auto-trading from within my mql4 ea when a target equity is reached. I know there is a mql4 function to do this but I can not find it. I tried searching with no success.
I would appreciate if someone can tell me where I find some documentation or example.
Not my knowledge. You can find out if AutoTrading is enabled:
You can also remove an EA from your chart:
Even more extreme, you can also force your terminal to close:
But it may be better to code your EA so that it doesn't trade if your equity is above a certain level using
Depending on what your EA is doing, you can run this check before a trade is placed, or at the start of OnTick().
Hope that helps.
To add comments, please log in or register