Please explain what could be wrong with this function? - page 7

 

This link says

Механизм обращения к серверу за данными не зависит от того, каким образом был инициирован запрос — пользователем при навигации по графику или программным способом на языке MQL5.


apparently this is about the older data, and the latest, most recent data should be obtained simply because the chart of the instrument is open? Or not?

What is the difference in obtaining data by different functions?

 
Slawa:
Have you read in full in the documentation about data access organization?

Slava, have you looked at my application?

MQL5: error #4806
Open, Started: 2016.02.15 11:22, #1409574

Cache maintenance via indicator twitching is not working.

Run the attached EA, after a while you get an error in the logs.

 
Andrey Khatimlianskii:

Slava, have you looked at my application?

Cache maintenance via indicator twitching doesn't work.

Run the attached EA, get an error in the logs after a while.

Yes, I did. But I didn't find any EA there.

I checked with my EA. I repeat: the presence of any indicator handler (in my case iMA) prevents the unloading of historical cache.

Let's send your EA here (and you can do it in the above application) - I will run it in different terminals. Let's see

 
Alexey Viktorov:

Dimitri, isn't that strange? There is a new bar, but we won't count it yet.

Listen, isn't it the cause of such behavior SeriesInfoInteger(_Symbol, PERIOD_D1, SERIES_LASTBAR_DATE);? New bar appeared, tick is available code is executed, but time is not yet taken into account???

In terms of time use - correct. It is accepted that the upper limit of the specified time range does not apply. But in this case it is inconvenient - yes.

AboutSeriesInfoInteger(_Symbol, PERIOD_D1,SERIES_LASTBAR_DATE), I do not know, I had not used and probably will not use, if I need time of bar, I will use CopyTime() or CopyRates().

The developers should make an analogue of iBarShift(), rewrite Bars() a bit and it would work.

 
Slawa:

Yes, I did. But I didn't find any councillor there.

I checked with my EA. I repeat: the presence of any indicator handler (in my case iMA) prevents the unloading of historical cache.

Give your EA here (or you can do it in the above application) - I will run it in different terminals. Let's see

The Expert Advisor was attached in the first post (zip, 58.91 KB). Don't you have files stored anywhere?

Built the version where it all started and attached it. Try it out. The test conditions and set-file are there too.

 
Dmitry Fedoseev:

In terms of time use, correct. It is accepted that the upper limit of the specified time does not apply to the range. But in this case it is inconvenient - yes.

AboutSeriesInfoInteger(_Symbol, PERIOD_D1,SERIES_LASTBAR_DATE); I don't know, I had not used and probably will not use, if I need bar time, I will use CopyTime() or CopyRates().

The developers should make an analogue of iBarShift(), rewrite Bars() a bit and it would work.

Accepted in other programming languages?

Well, hitting the upper boundary of the range is half the trouble. What you call "an inconvenience", I call stupidity to which you may get used to and consider using in your programs.

I simply found inadequate behavior of the function, and there's no other name for it, so I tried to explain it to the developers. But instead of trying to understand what was going on ... that's it... silence. No one needs it.

I also already gave up using this function and replaced it with CopyRates() just by inertia continued to explain, probably because the drummer renamed the topic so that I ask for a hint, and not report a problem in mql5.

 
Andrey Khatimlianskii:

The advisor was attached in the first post (zip, 58.91 KB). Don't you have files stored anywhere?

Have assembled the version where it all started and attached it. Try it out. The test conditions and set file are there too.

Got a lot of work yesterday. Turns out there is a zipped source of the Expert Advisor in the first post. That's what I'm using.
 
Alexey Viktorov:

Having simply discovered the inadequate behaviour of the function, which is the only way to describe it, I tried to explain it to the developers. But instead of trying to understand what's going on... that's it... silence. No one needs it.


Where do you see inadequate behavior of the function? Have you read the documentation carefully?

SeriesInfoInteger

Returns information about the state of historical data.

Returns information about the state of historical data. Doesn't update information, doesn't initiate data paging. Just returns what is currently there.

 
Slawa:

Where do you see inadequate behaviour of the function? Have you read the documentation carefully?

Returns information about the status of historical data. Doesn't update the information, doesn't initiate data paging. Just returns what is there at the moment.

If you don't mind, go to https://www.mql5.com/ru/forum/89213/page6#comment_2605980, it's all there.

SERIES_LASTBAR_DATE Time of the last bar opening by the symbol-period. But when a new bar appears but the function either sees or does not see it, what is it called? Culturally speaking, it's called "function's INSTABLE operation", or simply inadequate behavior...

Secondly, you shouldn't have been talking nonsense in the first replies to my application to the SD.

 
Alexey Viktorov:

SERIES_LASTBAR_DATE Opening time of the last bar by period character. When a new bar appears but the function sees it and doesn't see it, what is it called? Culturally speaking, the "function's INSTABLE operation", or simply its inadequate behavior...


If the corresponding history data was unloaded by timeout, what should the SeriesInfoInteger function return with SERIES_LASTBAR_DATE request?

And who will check the result of GetLastError()?

Your request to servicedesk is called "An odd if(condition) condition is not fulfilled". (Holy crap! The IF IS NOT WORKING!!!) And it was you who was talking nonsense in that request. You've got it all mixed up in there. Re-read your application again in a calmer state, through the eyes of an outsider.

And there is no need to attack - this is a technical forum, and arguments must be competently prepared.