Please help to a newbie about two functions

 

1. I could not understand when _stopFlag is true. I have a trivial code for seeing its effect, but nothing happen with the following code when I try to remove EA from the chart. How can I see its effect, could you please give me an example?

void OnTick()
  {
    if(IsStopped())
     {
      Print("qwsdfgtre");
      Sleep(5000);
     }   
  }


2. I could not understand what is implied with "SERIES_SYNCHRONIZED" ... there is not a clear explanation for it in the reference.

"Organizing Data Access" page says that "Since a mql5 program can call data from any symbol and timeframe, there is a possibility that data of a necessary timeseries are not formed yet in the terminal or the necessary price data aren't synchronized with the trade server. In this case it's hard to predict the latency time."

And the related enumaration page just says that "Symbol/period data synchronization flag for the current moment."

But, there is no explanation for what is data synchronization.

When or in which cases the symbol/period data synchronization flag for the current moment can be false?


Thanks a lot.

 

I've solved the first one ... understood IsStopped().

Any help for the second part?

Thanks.

 

There is one usage example of SERIES_SYNCHRONIZED in the reference.

But, as I'm not so clever person, I could not soundly understand when we should/need to check it.


Could you please tell me what is exactly implied by the SERIES_SYNCHRONIZED ... and in which situations it can be false?

Thanks a lot.