After chart "Waiting for Update" message Expert STOPS WORKING!!!!!

 

My expert uses bar data to analyze the market.

Sometimes (rarely) you get a message in the chart "WAITING FOR UPDATE", which I assume is due to some lag between my computer and the server.

The problem is, right after that message disappears and the bar chart is displayed again, the expert just stops working!!!

There is no error message, no deinitialization of the expert, it still shows as active, only nothing is happening. It's like special function start() is not triggering anymore.

Luckily since I am still in the development stages of me EA, this has not caused any problems. However on live trading if this were to happen, I could potentially lose a lot of money.


Can anyone shed some light on this please??

Thanks,

nanquan

 

1. Install MT from other broker then compare them.

2. Check your internet connection.

3. Wanna crazy stuff ?, Take the risk your self, call start() from init() on EA :

#import "Connect.dll"
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa366143(v=vs.85).aspx
   int  IsInternetConnected();  // 0 = connected 1 = not connected
//+------------------------------------------------------------------+   
int init()
  {
  
  start (); // call start from init()
  
  return (0)
  }

//+------------------------------------------------------------------+
int start()
  {
  
  while (IsStopped () = false)
    {
    if (IsInternetConnected() == 1 ) Alert ("No Con, Dude");
    
    // de do do do, de da da codes
     
    Sleep (1000);
    }
  
  return (0);
  }
//+------------------------------------------------------------------+

No need to have Expert enabled, but you can't stop EA from running.

Like I said, risk is yours

Have fun :)

 
nanquan:

My expert uses bar data to analyze the market.

Sometimes (rarely) you get a message in the chart "WAITING FOR UPDATE", which I assume is due to some lag between my computer and the server.

The problem is, right after that message disappears and the bar chart is displayed again, the expert just stops working!!!

There is no error message, no deinitialization of the expert, it still shows as active, only nothing is happening. It's like special function start() is not triggering anymore.

Do you know this or are you just guessing ? why not add some debugging Print() statements to your start() function and then you will have a better idea of what is happening . . . for example:

static int start_count = 1;

Print("start called ! #", start_count);

start_count++;

also try looking for error 4066 and return if you find it . . .

 
nanquan:
Sometimes (rarely) you get a message in the chart "WAITING FOR UPDATE", which I assume is due to some lag between my computer and the server.

Wrong assumption. It's a known bug, normally when you first open a new chart.

  1. Don't install in \program files* on Vista/Win7
  2. Open the market watch (control-M) and drag a symbol on to the chart.
 
WHRoeder:

Wrong assumption. It's a known bug, normally when you first open a new chart.

  1. Don't install in \program files* on Vista/Win7
  2. Open the market watch (control-M) and drag a symbol on to the chart.

Could you please elaborate on the part of not installing to '\program files*' ?

Mine is installed under 'C:\Program Files (x86)'... what is the significance of that, and how does it contribute to this 'bug' ?

Thank you!

 
nanquan:

Could you please elaborate on the part of not installing to '\program files*' ?

Mine is installed under 'C:\Program Files (x86)'... what is the significance of that, and how does it contribute to this 'bug' ?

Thank you!

Here's some example https://www.mql5.com/en/forum/138899/page2
Reason: