There were some problems with SERIES_LASTBAR_DATE. It was discussed here somewhere long ago. Maybe it was fixed.
The iXXX() function works fine, I've been using it for about 3 months (since I started using MQL5) - I haven't noticed any bugs or... - It's very handy and everything works!
SZZY: it works as written in Help :
Parameters
symbol
[in] Instrument symbol name. NULL means current symbol.
timeframe
[in] Period. Can be one of values of enumeration ENUM_TIMEFRAMES. 0 means period of current chart.
Do you always just write and don't try to read? I gave you a link to a whole article about the New Bar! Articles are checked - checked by people of a different competence than those who write constantly on the forum ;)
ZS: If you stop writing and start reading, such as the article on my link, you can find another way ( SERIES_LASTBAR_DATE) not to use the iXXX() - I told you not to use them ))) - who would tell the bugs and errors that the developers released shoddy )))))
Thanks for the link. I wasn't criticizing your solution, just pointing out the iTime call, which itself hints at using iXXX functions, which supersedes the point of fiddling with CopyRates. That is, looking for a new bar with iTime to use CopyRates in order not to use iXXX functions (iTime).))) Vicious circle.)))
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
There were some problems with SERIES_LASTBAR_DATE. It was discussed here somewhere long ago. Maybe it was fixed.
The iXXX() function works fine, I've been using it for about 3 months (since I started using MQL5) - I haven't noticed any bugs or... - It's very handy and everything works!
SZZY: it works as written in Help :
Parameters
symbol
[in] Instrument symbol name. NULL means current symbol.
timeframe
[in] Period. Can be one of values of enumeration ENUM_TIMEFRAMES. 0 means period of current chart.
Do you always just write and don't try to read? I gave you a link to a whole article about the New Bar! Articles are checked - checked by people of a different competence than those who write constantly on the forum ;)
ZS: If you stop writing and start reading, such as the article on my link, you can find another way ( SERIES_LASTBAR_DATE ) not to use the iXXX() - I told you not to use them ))) - who would tell the bugs and errors that the developers released shoddy )))))
I converted many MT4 EAs to MT5 without modifying source code. I posted the sabot as Open[i].
Ever done performance measurements between CopyXXX and iXXX functions? This question is very interesting.
So far I see one obvious convenient use of iXXX functions - less remaking of MQL4 code when porting it to MQL5.
In other cases (without knowledge of performance) - the choice is based only on users preferences.
Sabz in the form of Open[i] posted.
Didn't pay attention to this code, checked it - it works!
ZS: I need to see how I got [] tomorrow when I have a clear head - I tried it several times - it didn't work for me!
Ever done performance measurements between CopyXXX and iXXX functions? Very interested in this question.
I haven't. I very rarely deal with bars. Nothing should be faster than CopyXXX functions. Only if you cache it.
Ever done performance measurements between CopyXXX and iXXX functions? Very interested in this question...
I haven't. I very rarely deal with bars. Nothing should be faster than CopyXXX functions. Only if you cache it.
Measured:
2019.07.30 00:44:29.156 tst_iXXX_Copy (EURUSD,H1) CopyClose: loops=1410065408 ms=69407
2019.07.30 00:45:29.408 tst_iXXX_Copy (EURUSD,H1) iClose: loops=1410065408 ms=60250