I want to know how to end the EA which is running in a never ending loop. can anybody help. Cheers
Is there a exit function i could use. what is the syntax ?
Depends on the code - you could use break; ExpertRemove(); return; or instead change the loop control mechanism, depending on the situation.
If you share the code it would be easier to see what the right approach could be
If the infinite loop is something needed in the logic, then I would use isStopped() to avoid abnormal terminations
while(!IsStopped()) { /* */ }
However that's not something I would recommend doing in an EA or indicator (you can use timers for that purpose), but in scripts and services it can make more sense depending on the case
If the infinite loop is something needed in the logic, then I would use isStopped() to avoid abnormal terminations
However that's not something I would recommend doing in an EA or indicator (you can use timers for that purpose), but in scripts and services it can make more sense depending on the case
thank you

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to know how to end the EA which is running in a never ending loop. can anybody help. Cheers
Is there a exit function i could use. what is the syntax ?