Only one I know is a divide by zero in the tester, kills the EA.
GlobalVariableSet("Count_EAs",GlobalVariableGet("Count_EAs")-1);
This may not be safe, On startup or shutdown of the terminal, these may be done concurrently, but it's two calls so one my clobber another.
Why do you even care it the EA is running on another pair?
WHRoeder:
Only one I know is a divide by zero in the tester, kills the EA.
This may not be safe, On startup or shutdown of the terminal, these may be done concurrently, but it's two calls so one my clobber another.
Why do you even care it the EA is running on another pair?
Thanks for your response. No problem in tester.
I use EA_Count as part of Money Management in allocating Free Margin for lot size calculation.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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 use GlobalVariableSet() in init() call to count number of EAs running on Terminal.
While Terminal is running with EAs loaded OK and EA count in Global Variables correct, later on the EA count will repeatedly double, indicating repeating init() calls. Example: Count_EAs at 3, sometime later becomes 6, sometime later becomes 9 and etc.
My question is: What Terminal events that can cause only repeated init() calls and does not call deinit() ?