Refreshing the data

 

Hi,

Since my broker have trouble with the data on the charrt,

I would like to code the following:

1) Download data for a given symbol.

2) Refreshing the data for a given symbol (like: right click on a chart and refresh. For a given symbol, not only the active chart).

How do I do that?

Thanks.

 

Hi


I found this function:

https://docs.mql4.com/series/copyrates


int  CopyRates(
   string           symbol_name,       // symbol name
   ENUM_TIMEFRAMES  timeframe,         // period
   int              start_pos,         // start position
   int              count,             // data count to copy
   MqlRates         rates_array[]      // target array to copy
   );



Does anybody know if this function is it?

Does it get its data to  MqlRates directly from the broker server?

CopyRates - Timeseries and Indicators Access - MQL4 Reference
CopyRates - Timeseries and Indicators Access - MQL4 Reference
  • docs.mql4.com
Gets history data of MqlRates structure of a specified symbol-period in specified quantity into the rates_array array. The elements ordering of the copied data is from present to the past, i.e., starting position of 0 means the current bar. If you know the amount of data you need to copy, it should better be done to a statically allocated...
 

Attach is an example of the data gap that I got on my charts when opening my charts.


Anyone has an idea how automatically refresh the charts that there will be no gap in the data?

Files: