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
By the way, about the Bars() function. It might be the cause of the clincher.
Cotypes can go for all characters except the one of interest.
OK, looked at the new source code. Saw that the edits that were discussed weren't made. Exit.
It only makes sense to use SYMBOL_TIME when the requested symbol is not in the Market Watch window. Then TimeCurrent won't do its job. But this variant of using Bars seems unlikely to me. But the price of getting the current time via SYMBOL_TIME is much higher because SymbolInfoInteger(symbol_name,SYMBOL_TIME) takes almost an order of magnitude longer. Of course, you can check if the symbol is in the market report and depending on the result useTimeCurrent or SYMBOL_TIME, but it's not free, moreover you always have to monitor if a new symbol is added or deleted from the market report. Therefore it is easier to make a clause that for correct work of iBars it is reasonable to have the requested symbol in the market report.
About SERIES_LASTBAR_DATE I think you are wrong.SymbolInfoInteger(symbol_name,SYMBOL_TIME) is the lesser evil.
The SeriesInfoInteger function doesn't cause any history paging. If there is anything that causes it, it's a request for Bars, which is logical. And the source of brakes can be seen in this short script, if you run it
Generally a very strange bug. I checked the effect of the download history on it when I found that suddenly today on the EURUSD symbol it almost didn't show up.
Forced me to download all the history. And the bug appeared again.
I guess the download history has no effect on this bug.
I don't understand why this bug is floating around.
Used this script to test it:
I don't understand why this bug is floating around.
Is the SD aware of this whole topic?
Is the SD aware of this whole topic?
Yes, already wrote there on 30.03.2018 - so far silence.
In general, I think data loading/uploading is the weak point of the terminal.
Agreed, but it's also one of the most difficult tasks.
The iBars function is quite cumbersome, but I still recommend using it instead of the regular Bars, until MQ fixes the hang-up bug in it.
The iBar hangs when logically it should return 0. As a rule, it returns it for more than 10 seconds. There is no such bug in MQL4.
In the majority of tasks, iBars will work faster than the regular Bars since it will not only avoid the bug, but tries not to use the Bars and SeriesInfoInteger functions whenever possible due to the algorithm of saving previous values.
I have tested this function far and wide. It seems to be a full copy of Bars.
Perhaps it can be done in a more elegant way. If you have a desire, you are welcome. If you find errors, we will fix them.
So...
Then the full analogue of iBarsShift function will have the following form:
And the variant without the last parameter, which is used in the vast majority of cases will look like this:
I use your code iBarsShift+iBars (and other iBarsShift) and get 0 from iBarsShift, and an error when TF chart H1 and calculating for H1
which corresponds to this line of code
Here is the code of indicator as a whole
WhyPrint(Day_Shift) always returns zero, while date and time are correct?
It seems to be a weekend effect, since everything was working correctly the other day (although with a different function, but it doesn't work today either).
I use your code iBarsShift+iBars (and other iBarsShift) and get 0 from iBarsShift , and when TF chart H1 and calculating on H1 an error
which corresponds to this line of code
Here is the code of indicator as a whole
WhyPrint(Day_Shift) always returns zero, while date and date are correct?
It seems to be a weekend effect, since everything was working correctly the other day (although with a different function, but it is not working today too).
I apologise for leaving the code in the wrong form.
I noticed the inaccuracy back then and almost fixed it, but there was still a small, easily fixable problem.
I just abandoned the code due to the fact that I'm studying now and exams have started and I just don't have time. The last exam is on the 24th of April.
After that I will fix everything and post it on CB.
I've already started publishing it, but have put it on hold.
I apologise for leaving the code in the wrong form.
I noticed the inaccurate work back then and almost fixed it, but there was still a small easily fixable problem.
I just abandoned the code because I'm studying now and exam time has started and I just don't have the time. The last exam is on the 24th of April.
After that I will fix everything and post it on CB.
I have already started posting but have put it on hold.
I will wait for the corrections in the final form, thanks for responding.
Good luck with the exams!
I will wait for the corrections in the final form, thank you for replying.
Good luck with your exams!