
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
Then I don't understand why Bars thinks that 18:00:01 belongs to M1-bar 18:01 and not 18:00.
And the logic here is the same as the fact that my daughter is now on her second birthday, even though she only turned one a week ago. Or today is 09.04.2018, although 01 Jan 00 was 2017 years, 3 months and 8 days ago .
By the way, TimeCurrent needs to be replaced with SYMBOL_TIME.
Thanks! I really didn't know about such an identifier.
By the way, when I tested the correctness of the iBars algorithm by comparing it to the Bars reference in MQL4, trying different variants at random, I found a bug in Bars:
There is no such a bug in MQL5.
Of course it is not significant, since it only appears in TF = MN1, at dates 30 and 31, stop_time = 23 and only before 2005 :)))
Here is the script for MQL4 that catches it, and iBars turned out to be more reference than native Bars.
By the way, TimeCurrent should be replaced by SYMBOL_TIME.
No, you don't.
It won't add correctness, because TimeCurrent() is universal for all symbols, because it returns the last arrival time of the quote for all symbols, not the current one.
At the same time, SymbolInfoInteger(symbol_name,SYMBOL_TIME) is very slow compared to TimeCurrent(), and this time is needed at each call of iBars
For those who are interested.
Edited version of iBars (similar to built-in Bars, only without glitches and faster).
Fixed some bugs.
If you have noticed that your MQL5 code hangs for 10-20 seconds all of a sudden and has the Bars function, which can return 0, then I strongly recommend replacing it with this version.
It will work faster and without hangs.
Edited version of iBars(similar to the built-in Bars, only without glitches and faster).
Fixed some bugs.
Built-in Bars() is overloaded:
You only have one call form.
The built-in Bars() is overloaded:
You only have one form to call.
if you need a short form, it's fine to use the built-in one. There are hardly any glitches there.
No, it is not necessary.
It will not add correctness, because TimeCurrent() is universal for all symbols, because it returns the last arrival time of quotation for all symbols, not the current one.
SymbolInfoInteger(symbol_name,SYMBOL_TIME) is very slow compared to TimeCurrent(), and this time is needed every time iBars is called
Cotypes can go for all characters except the one of interest.
Ok, looked at the new source. Saw that edits, that were discussed, have not been made. I'm out.