EA is using 100% CPU in MetaTrader 4

 
Hi, my problem is: when I put the EA in 15 pairs for example, 1 by 1, this problem doesn't appear. But if I start MT4 with the EA already attached to those 15 pairs MT4 uses 100% CPU until I close it. This is so strange, anyone got a clue?
 
Jasus5457:
Hi, my problem is: when I put the EA in 15 pairs for example, 1 by 1, this problem doesn't appear. But if I start MT4 with the EA already attached to those 15 pairs MT4 uses 100% CPU until I close it. This is so strange, anyone got a clue?
Difficult to say without seeing the code.
 
One by one would suggest different initialise times as opposed to starting MT4 and all initialising at once.
 
RaptorUK:
Difficult to say without seeing the code.


Sorry but the code has 2.5k+ lines =\ 

 

Ickyrus I'll try write that into the EA so they initialize at different times, thanks! 

 
I made the EA start with a 10 seconds interval between pairs and it's fine now :)
 
Jasus5457:
I made the EA start with a 10 seconds interval between pairs and it's fine now :)
It's not,  you have just implemented a workaround, you do not know the cause,  you have learned noting in the process and your issue still exists. If your happy that's great,  but don't delude yourself into thinking you have fixed anything.  I would recommend that you do actually continue to investigate the cause and fix it, what ever is causing your issue might have other unknown effects.
Reason: