About SERIES_SYNCHRONIZED

 

In my history folders, for EURUSD, I have only the 2016 hcc file and the hc file for M30.

With the following code, why do I get "true"?

SERIES_SYNCHRONIZED here refers to which type of synchronization?

Print((bool)SeriesInfoInteger(_Symbol, PERIOD_H4, SERIES_SYNCHRONIZED));

 
Probably, synchronization here refers to the synchronization between the data in the .hcc files and the server side data, it is not related with the formed timeseries data. Any confirmation?
 
attila.okcu:
Probably, synchronization here refers to the synchronization between the data in the .hcc files and the server side data, it is not related with the formed timeseries data. Any confirmation?

It's difficult to be sure, I didn't find any reliable information.

Only way is to test it (or ask Metaquotes directly).

 
Alain Verleyen:

It's difficult to be sure, I didn't find any reliable information.

Only way is to test it (or ask Metaquotes directly).

I see ... thanks a lot.

The usage in the documentation says that it is related with the timeseries.

But in my test, the timeseries is not built in the history folder even after closing the platform, which is H4.hc file in my example.

 
attila.okcu:

I see ... thanks a lot.

The usage in the documentation says that it is related with the timeseries.

But in my test, the timeseries is not built in the history folder even after closing the platform, which is H4.hc file in my example.

Forum on trading, automated trading systems and testing trading strategies

About SERIES_SYNCHRONIZED

Alain Verleyen, 2016.11.07 18:20

...

Only way is to test it (or ask Metaquotes directly).


 

Asked it, hoping to get a reply.


Maybe, it is not so frequently used parameter for that function.

I just would like to get the full coverage of the API.

 

I've got the following reply from the service desk: "Actually, the SERIES_SYNCHRONIZED flag means that the local price history is synchronized with the server. It is not related to timeseries."

And, the service desk also said that the example code in the documentation will be checked and fixed if necessary.

 
attila.okcu:

I've got the following reply from the service desk: "Actually, the SERIES_SYNCHRONIZED flag means that the local price history is synchronized with the server. It is not related to timeseries."

And, the service desk also said that the example code in the documentation will be checked and fixed if necessary.

Thanks.
 
attila.okcu:

I've got the following reply from the service desk: "Actually, the SERIES_SYNCHRONIZED flag means that the local price history is synchronized with the server. It is not related to timeseries."

And, the service desk also said that the example code in the documentation will be checked and fixed if necessary.


The following comments and code are what we have currently in the MQL 5 documentation:


 while(!IsStopped())
     {
      //1. wait for synchronization between the re-built timeseries and intermediate history as HHC
      //2. receive the current number of bars in this timeseries
      //    if bars is larger than Max_bars_in_chart, we can exit, work is over
      //3. obtain the start date first_date in the re-built timeseries and compare it to start_date
      //    if first_date is lower than start_date, we can exit, work is over
      //4. request from a server a new part of history - 100 bars starting from last available bar numbered 'bars'
     }

The first three points are implemented by already known means.

   while(!IsStopped())
     {
      //--- 1.wait till timeseries re-build process is over
      while(!SeriesInfoInteger(symbol,period,SERIES_SYNCHRONIZED) && !IsStopped())
         Sleep(5);
      //--- 2.request how many bars we have
      int bars=Bars(symbol,period);
      if(bars>0)
        {
         //--- bars more than ones that can be drawn in the chart, exit
         if(bars>=max_bars) return(-2); 
         //--- 3. return the current start date in the timeseries
         if(SeriesInfoInteger(symbol,period,SERIES_FIRSTDATE,first_date))
            // start date was earlier than that requested, task completed
            if(first_date>0 && first_date<=start_date) return(0);
        }
      //4. Request from a server a new part of history - 100 bars starting from last available bar numbered 'bars'
     }



If this flag is not related with the timeseries as the service desk says, I think that the example (code and comments) on the related pages of the documentation should be corrected.

But, as I'm fairly new in programming, can not be sure, may be missing something ... any confirmation or rejection?

Reason: