rates[0][3] is this the las tick of the bar?

 

hi

I'm using this (from an article):

   if(!rates.CopyRates(_Symbol, _Period, COPY_RATES_OHLC, 0, sample_size))

(but doesnt look like the ones of the docs ; why?

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
   );

Call by the start date and the number of required elements

int  CopyRates(
   string           symbol_name,       // symbol name
   ENUM_TIMEFRAMES  timeframe,         // period
   datetime         start_time,        // start date and time
   int              count,             // data count to copy
   MqlRates         rates_array[]      // target array to copy
   );

Call by the start and end dates of a required time interval

int  CopyRates(
   string           symbol_name,       // symbol name
   ENUM_TIMEFRAMES  timeframe,         // period
   datetime         start_time,        // start date and time
   datetime         stop_time,         // end date and time
   MqlRates         rates_array[]      // target array to copy
   );


well ... using this, title?

(probably this changes all)

   matrix rates;

can you explain this?

 
Javier Santiago Gaston De Iriarte Cabrera:
but doesnt look like the ones of the docs ; why?

Because it's a matrix method. Documentation of the methods for the matrix is here:

https://www.mql5.com/en/docs/matrix/matrix_initialization/matrix_copyrates

 
Vladislav Boyko #:

Because it's a matrix method. Documentation of the methods for the matrix is here:

https://www.mql5.com/en/docs/matrix/matrix_initialization/matrix_copyrates

Thanks, so rates[0][3] is the last tick I suppose.