Use Magic Numbers and a Mutex to avoid "trade context busy" . . .
That statement is in direct conflict with every other one you just posted.
The EA's are not using magic number and pair in their orderSelect loops, they are using things like orderselect(0) and if (OrdersTotal()) instead of counting the EA's using magic numbers and pairs. At least one of the EAs is incompatible with any other (including itself on other charts and manual trading)
Use Magic Numbers and a Mutex to avoid "trade context busy" . . .
Thanks guy for your reply. But the situation is more complex: I use magic number and also a particular comment for each EA. The orders are separeted, each EAs close the positions that they have opened, no problem about it.
The problem is that an EA works correctly but also generete orders without reasons when I use it on another MT4 platform.
I make an esample to be clear.
I have Platform_1 with 3 EA (named A, B and C) and a Platform_2 with 2 EA (named D and E). They run on different account and there aren't troubles.
Then, I decide to use the same account for Platform_1 and Platform_2 and the EA named "A" starts to place BUY orders without reason, open and immediately close the positions on the chart where it is activated.
Thaks guy for your help!
P.S: what is Mutex??
What conditions do you use to decide when an order is placed ?
MutEx - Mutual Exclusion : https://en.wikipedia.org/wiki/Mutual_exclusion stops more than one EA trying to use the trade context at once.
The problem is that an EA works correctly but also generete orders without reasons when I use it on another MT4 platform.
Then they are NOT working correctly. The code is wrong and that IS the REASON.
Stop complaining! Either fix the code or post the code - there are no mind-readers here.
What conditions do you use to decide when an order is placed ?
MutEx - Mutual Exclusion : https://en.wikipedia.org/wiki/Mutual_exclusion stops more than one EA trying to use the trade context at once.
Then they are NOT working correctly. The code is wrong and that IS the REASON.
Stop complaining! Either fix the code or post the code - there are no mind-readers here.
I think you are right, it is clear there is an error in the use of magic number or in the orderSelect loops of the EAs.
Thanks a lot
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guy, I have a problem and I dont see the solution.
I have realized some EAs on a MT4 platform and they run very well together. Then, I realized new EAs on a second MT4 platform and also they run very well together.
Then, I decided to put all the EAs in a single MT4 platform, one platform for all my EAs (I have copied and pasted the EAs files). After some days, there was a trouble: one EA starts to place BUY order without logical reason, whitout rules on the charts where it was attached.
So, I return to the origin, I separetad the two group of EAs and I run them on different platforms but on the same account. After some day, there was the same problem on the same EA of the first time.
I think the EAs are correct, they run well, perfect open and close operations but when I put them all together one EA generate market BUY (only buy) orders without particular reasons.
Can you give me some help about this problem? Are there particular tecnical warnings or limitations using or copying EAs on MT4?
Thak yuo very much guy for your help