Download MetaTrader 5

Infinite sleep under server 2k3 64bit

To add comments, please log in or register
Copy the deals of successful traders. Subscribe to signals!
hornsALERT
62
hornsALERT 2010.11.20 11:08 

Under build 355, my EA works fine with windows vista home premium x32 however on windows server 2003 x64 an infinite sleep error is detected. Below is a snippet for my data access. Is this a bug?


   bool Cssneye::InitBuffer(int handle,double &buffer[],int bufferindex,int bufferstart,int buffersize){ 
      tries=0;
      while(CopyBuffer(handle,bufferindex,bufferstart,buffersize,buffer)<buffersize && ++tries<10){
         Sleep(1000);}
      if(tries>=10){Print(" Buffer copy failed, err # ",GetLastError());ResetLastError();}
      return(tries<10);}
Stephen Njuki
5180
Stephen Njuki 2010.11.20 18:51  
Hello that is my alias :)...
Can I please have some response from metaquotes?
Rashid Umarov
Admin
11995
Rashid Umarov 2010.11.22 07:13  
When do you get this error - during back testing or when EA works on a chart?

Stephen Njuki
5180
Stephen Njuki 2010.11.22 11:43  
when backtesting
Rashid Umarov
Admin
11995
Rashid Umarov 2010.11.22 13:51  
ssn:
when backtesting
I suggest you call function
Cssneye::InitBuffer()

into OnInit(), do you?


PS. Can you provide your source code? For example, through Private message?

MQL5.community - User Memo
  • 2010.02.25
  • MetaQuotes Software Corp.
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
Stephen Njuki
5180
Stephen Njuki 2010.11.22 15:18  
Hi Rosh,

am at work and away from my notebook so I cannot try what you are suggesting however initbuffer is used for loading a variety of indicators depending on the EA's input parameters... so calling it once oninit may not be feasible.

Additionally there are times I need to simply update a an array and this will also involve calling initbuffer at runtime...
Rashid Umarov
Admin
11995
Rashid Umarov 2010.11.22 15:31  
Ok, I hope to receive source code from you when you can do it.

To add comments, please log in or register