Sphelele Sphesihle Lubanyana: If I attach 2 Eas on one chart it gets confused and does its own thing.
If you read the documentation, you know you can only have one EA per chart.
Stop wanting to be lazy..
Use a Global Terminal Variable as your source for the magic number, increase the counter according.
EDIT:
Alrernative would be to use the windows handle as your magic number. - Well, good luck with picking up your positions after terminal restart.
The point of magic numbers is to have a "UID" to identify your positions to your EA after restart...
Take that into account.
![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 have an issue with my ea. If I attach 2 Eas on one chart it gets confused and does its own thing. I want a way that the ea detects that it has been attached on a particular chart and increases the magic number because I dont want to do it manually
example:
if "boom 1000 Index" has a magic 7897 then if I attach the ea on Boom 1000 index again, the magic number should be 7898.