Start Expert After Data Update

 

Hello everyone

I'm running an expert on 1m chart. I have a problem when I start the MT while the expert is placed on chart. The expert start computing its values based on the bars on chart (which are not up to date when MT starts).

I need a way to make the expert starts aafter the missing bars are downloaded from server.

any idea appreciated :)

 

while(TimeCurrent()-iTime(NULL,PERIOD_M1,0)>60) Sleep(5000);

 
irusoh1:

while(TimeCurrent()-iTime(NULL,PERIOD_M1,0)>60) Sleep(5000);


Thank you

I think MT updates bars backwards ( i.e. newest downloaded first ) . So I think the code above will work with the first downloaded batch, and after that will return false.

Am I right?

 
any idea?!