Download MetaTrader 5

EA High CPU USage????

To add comments, please log in or register
Lorraine Pierce
2052
Lorraine Pierce  

Hey folks,

I have my EA running on a VPS and it's using max CPU. I deleted everything. Then I added back my indicators one at a time, monitoring the CPU. It was fine until I adde the EA. For each currenty pair I added, it took up about 12-15% CPU.

 Is this common for EA's?

I've read that an "open loop" can cause this?

Alain Verleyen
Moderator
32482
Alain Verleyen  
Your EA is probably not well coded, but difficult to say without seeing the code.
Francis Dogbe
9505
Francis Dogbe  
Alain Verleyen:
Your EA is probably not well coded, but difficult to say without seeing the code.
Hi Alain, i have also experience the same problem before. If you are saying that the EA is not coded well? Is there any material or protocol that is avaliable for the programmers to follow that will help reduce CPU usage. Because most EAs use a lot of CPU resource form my experience. :)
Alain Verleyen
Moderator
32482
Alain Verleyen  
Francis Dogbe:
Hi Alain, i have also experience the same problem before. If you are saying that the EA is not coded well? Is there any material or protocol that is avaliable for the programmers to follow that will help reduce CPU usage. Because most EAs use a lot of CPU resource form my experience. :)

No recipes. From my experience most EAs which "use a lot of CPU resource" are not well coded.

You can send me one and I will check if you want.

Lorraine Pierce
2052
Lorraine Pierce  
Alain Verleyen:

No recipes. From my experience most EAs which "use a lot of CPU resource" are not well coded.

You can send me one and I will check if you want.

Do you offer coding services in the Freelance board? 
Alain Verleyen
Moderator
32482
Alain Verleyen  
Lorraine Pierce:
Do you offer coding services in the Freelance board? 

Yes but no

It's really simple, see this topic

Forum on trading, automated trading systems and testing trading strategies

Discussion of article "Use of Resources in MQL5"

Renat Fatkhullin, 2013.02.01 05:32

Example: https://www.mql5.com/ru/forum/3409#comment_408123

#resource "\\Indicators\\Examples\\CHO.EX5"
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   int handle=iCustom(Symbol(),Period(),"::Indicators\\Examples\\CHO.EX5");
   if(handle!=INVALID_HANDLE)
     {
      Print("Indicator created!");
      IndicatorRelease(handle);
     }
//---
   return(0);
  }
void OnDeinit(const int reason)
  {
  }
void OnTick()
  {
  }

To add comments, please log in or register