Rude response, second rude response (on my Do Not Help list), posting decompiled code, and a false apology (DNH). Live in ignorance.
Your question is nonsensical. One is a structure. It doesn't do anything or have anything. It is just a format for accessing data in an organised way. The other is a function, that does something and returns a value.
Instead, consider the question differently, for example ... why use CopyRates() instead of iHigh(), iLow(), etc.?
If you ask it that way, then it starts to make more sense. CopyRates returns data in an array of MqlRates, while iHigh, iLow only returns a single value.
CopyRates is more efficient for processing large amounts of data, while iHigh, iLow is simpler for singular values and sporadic use.
Does that answer your question?
Rude response, second rude response (on my Do Not Help list), posting decompiled code, and a false apology (DNH). Live in ignorance.
i don't think he'll beat your high score though 😇 😂
Your post is uncalled and off-topic. @Daniel Cioca has tried in his own way, in post #2, to apologise and lessen the animosity between the two. Please don't stir things up again.
Your post is uncalled and off-topic. @Daniel Cioca has tried in his own way, in post #2, to apologise and lessen the animosity between the two. Please don't stir things up again.
its humor . humor calms tensions . like this :
Does that answer your question?
Please read my answer again carefully ... "CopyRates is more efficient for processing large amounts of data, while iHigh, iLow is simpler for singular values and sporadic use."
Did I say it is better to use CopyRates instead of iHigh() or High[1] to just get a a "single" value?
Also, please remember that CopyRates was introduced into MQL4+, so as to be compatible with MQL5.
On MQL4 using the build in arrays High[i] is much easier and quicker, but that does not exist in MQL5.
In fact, on MQL4+ only (not MQL5) there is also ArrayCopyRates which yet another way of reading the data.
So, "which is better" depends on your needs and on which platform (MQL4 or MQL5) you are working.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use