Where is your "link below"?
https://docs.mql4.com/series/copyrates
Sorry, I updated my post. Now its easier to find the code.
Sorry, I updated my post. Now its easier to find the code.

CopyRates - Timeseries and Indicators Access - MQL4 Reference
- docs.mql4.com
CopyRates - Timeseries and Indicators Access - MQL4 Reference
meiti:
According to the documentation you have linked yourself, if you know the amount of data you need to copy, it should be better to provide a statically allocated buffer, in order to prevent memory [re]allocation.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello everyone!
I was looking at the function and its example code:
https://docs.mql4.com/series/copyrates
Question 1
the variable:
MqlRates rates[];
Do I need to free it before the function ends or does it do it automatically, if the code is exactly the same as below in that example code?
If I need to free it, then how?
Question 2
If the code is exactly the same as in example code then how does it exactly get those rates?
Does it copy data and reallocalize or does it return a point like in this c++ code:
Question 3
If it reallocalizes and copyes data to new array and returns it then:
I need to copy data of 3 days of 5 minute candles but I'll be looping around whole history data without overlapping.
Does that mean that I should use static array sized of '3 days candles' instead of dynamic array?
Thanks!