CopyRates bug on MT 5.0 build 3331

jluk
10
jluk  

Hi,

I would like report MQL5 CopyRates bug on MT 5.0 build 3331.

code is :

MqlRates arr_rates[];

int rates_cnt = CopyRates( symbol_name, PERIOD_M1, from, to, arr_rates);


return is :


it requested data from 2020.11.02 01:00:00 to   2020.11.02 23:50:00. But got return data of only 1 element of 2022.06.14 06:43:00 (see the attached screenshot).

Please help look into this issue.

Thanks.

Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / History Data Structure
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / History Data Structure
  • www.mql5.com
History Data Structure - Data Structures - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Files:
Capture.PNG  29 kb
Carl Schreiber
Moderator
13904
Carl Schreiber  
jluk:

Hi,

I would like report MQL5 CopyRates bug on MT 5.0 build 3331.

code is :

MqlRates arr_rates[];

int rates_cnt = CopyRates( symbol_name, PERIOD_M1, from, to, arr_rates);


return is :


it requested data from 2020.11.02 01:00:00 to   2020.11.02 23:50:00. But got return data of only 1 element of 2022.06.14 06:43:00 (see the attached screenshot).

Please help look into this issue.

Thanks.

Could be that for the symbol (which one?) only one exists. Your information in not sufficient.
jluk
10
jluk  
Carl Schreiber #:
Could be that for the symbol (which one?) only one exists. Your information in not sufficient.

I tried several symbols EURUSD, XAUUSD, USDCAD... Their history data are good, but all of them having same CopyRates issue.

Arpit T
507
Arpit T  
jluk #:

I tried several symbols EURUSD, XAUUSD, USDCAD... Their history data are good, but all of them having same CopyRates issue.

#property indicator_chart_window
#property indicator_plots 0

MqlRates arr_rates[];
datetime from = D'2020.11.02 00:00';
datetime to =   D'2020.11.02 23:50';
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit() {
//--- indicator buffers mapping
   
//---
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[]) {
//---
   ZeroMemory(arr_rates);       
   CopyRates( "AUDCAD", PERIOD_M1, from, to, arr_rates);
   Print(arr_rates[0].time);
//--- return value of prev_calculated for next call
   return(rates_total);
}

Yes i am also getting  2022.06.14 so possibly a bug