save specifc non successive bars rates in a mqlrates array

 

hi

copy rates function copy only a number of successive bars in a mqlrates array is there any way to save specific non successive bars rates in a array

think you

 
nix: copy rates function copy only a number of successive bars in a mqlrates array is there any way to save specific non successive bars rates in a array
You will need to make your own function for it. That is what programming is about—leveraging the existing functionality and making your own.
 
Fernando Carreiro #:
You will need to make your own function for it. That is what programming is about—leveraging the existing functionality and making your own.
thnx for your cuick response anay idea ??
 
nix #: thnx for your cuick response anay idea ??

Any idea about what?

The CopyRates() function has multiple forms which you can use depending on your needs.

So, If you want non-sequencial bars, create a function that will read the individual bars or range of bars, using CopyRates() and appends them to the array that holds the entire data that your require.

Documentation on MQL5: Matrix and Vector Methods / Initialization / CopyRates
Documentation on MQL5: Matrix and Vector Methods / Initialization / CopyRates
  • www.mql5.com
Gets the historical series of the MqlRates structure of the specified symbol-period in the specified amount into a matrix or vector. Elements are...