Errors, bugs, questions - page 1221

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
Error
Challenge:
Leads to a message in the logbook:
HistoryBase 'RTS-12.14' 1 invalid bars removed
I'm fed up with this error. Amongst other things, it's also loading up the communication channel.
The same error appears for other, unidentified reasons.
But, interestingly, it doesn't appear on many other instruments. It appears the most on the RTS futures.
I wrote to servicedesk a few months ago - no reply(Request started: 2014.07.28 13:41, #1046215).
I am attaching the code of the induke that causes this error on every tick of the current (and past) RTS futures (demo account with broker "O..."):
Is this a bug in the terminal? Or at the broker? Or me?
What should I do? How to know the number of bars on D1 timeframe otherwise?
Good evening. Have you tried it?
Good evening. Have you tried this?
Good evening to you, too. I've tried it. It's all the same.
The result is the same. The error is in the log for every tick.
Thank you for the idea. If SeriesInfoInteger() is not accessing Bars internally, then everything is more likely that it is a "narrow" data screw-up on the broker server.
And that is also a satisfactory answer to my question.
After all, it's not like I don't know where the error is going to pop up, whether I can avoid it, etc.
Good evening to you too. Tried it - same thing.
The result is the same. The error is in the log for every tick.
Thank you for the idea. If SeriesInfoInteger() is not accessing Bars internally, then it is more and more probable that it is a "narrow" data joint on broker's server.
And that too is a satisfactory answer to my question.
After all, I don't know where the error is going to pop up, whether I can avoid it, etc.
Probably, broker's error indeed, because the message deletes some "broken" bars... or the data gets "killed" on the way. But, this is just a guess on my part. By the way, does GetLastError() give me anything? Yes, and what does Bars() return?
If Bars() returns 0, then error 4001 (ERR_INTERNAL_ERROR 4001 Unexpected internal error).
But sometimes Bars() still returns number of bars and then there is no error (Bars() does not change error status).
MT4 build 722, ME4 build 989
Trying to copy current zero bar data:
Prints n=0 i.e. data is not copied.
If_Periodis written instead ofPERIOD_CURRENT , it works.
If you copy nonzero bar data (time[1], etc.), it will work, regardless of whether you writePERIOD_CURRENT or_Period.
P.S. Do you want it in a cd?
If Bars() returns 0, then error 4001 (ERR_INTERNAL_ERROR 4001 Unexpected internal error).
But sometimes Bars() still returns number of bars and then there is no error (Bars() does not change error status).
The "unexpectedness" of the error once again suggests that something does not have time to reach and is deleted, as a result of which the error occurs. As far as I understand, you need to find out the number of bars on D1... Do you have to do it on every tick? Alternatively, write a function that will request data once a minute or less. And see if an error occurs.
MT4 build 722, ME4 build 989
Trying to copy current zero bar data:
Prints n=0 i.e. data is not copied.
If_Periodis written instead ofPERIOD_CURRENT , it works.
If you copy nonzero bar data (time[1], etc.), it will work, regardless of whether you writePERIOD_CURRENT or_Period.
P.S. Do you want it in a cd?
What to do? How else do I know the number of bars on the D1 timeframe?
Is the indicator running on D1?
No, of course not. That is the whole point. For when the indicator itself is running on D1, we trivially have"constint rates_total, // size of input timeseries".
Here is a concrete example of its use.
We initialized a couple of indicators and got their handles (everything is OK here). Next, in the ontik function we need to make sure that at the time of the call all data has been calculated on the required handles (external indices). And this is what I do:
And in this case hDayTrand is a recursive handle (the same indicator, only D1 is loaded).
I seem to do everything according to documentation and examples from the terminal and to recommendations. The result is that all this stuff is scrambled in the log and eats megabytes per minute.
No, of course not. This is the whole point. For when the indicator itself is running on D1, we trivially have"constint rates_total, // size of input timeseries".
Here is a concrete example of its use.
We initialized a couple of indicators and got their handles (everything is OK here). Next, in the ontik function we must make sure that at the moment of the call all data on the required handles (external indices) has been already calculated. And this is what I do:
And in this case hDayTrand is a recursive handle (the same indicator, only D1 is loaded).
I seem to do everything according to documentation and examples from the terminal and to recommendations. The result - all this stuff is scribbled in the log and eats megabytes per minute.