The problem of transferring from MT4 to MT5. Or, more precisely, the inability to execute some algorithms in MT5 without'err. - page 6

 
Why not create your own terminal in the first place?
 
Artyom Trishkin:
You have to count all timeseries once, and then only supplement them. This may be done in the window.
Yes, into their arrays. You can use the SB. The timeseries class is its own.

This is nonsense!

What are the terminal and MQL for then? In order to write everything yourself? And to send orders by fix directly to the broker?

 
Eugeni Neumoin:

So you suggest not using buffers, but working with your arrays?

What are buffers for then?

So you propose to make your own crutch, instead of buffers :(

And instead of iTime, iLow, etc. make your own functions... Rewrite everything in its own way, bypassing functions that don't work from MT5...

This is drastic. But let enthusiasts do it. I'll stand aside. I won't even watch the process.

I've done a lot of indicators this way - on timeseries classes. Everything is there, and it's no different from working with ordinary indicators. But in addition - a bunch of conveniences.
 
Andrey Khatimlianskii:

An error in logic then, perhaps. There may not be a bar.

There is a bar. It's not always a function that gives out -1. I guess it's just this from the MT5 language description:

"...Data availability.

Availability of data in HCC format or even in ready-to-use HC format does not always mean the unconditional availability of this data for display on a chart or for use in mql5-programs.

When accessing price data or indicator values from mql5-programs , one should keep in mind that it is not guaranteed to be available at a certain point in time, or from a certain point in time..."

 
Andrey Khatimlianskii:

This is nonsense!

What are terminals and MQLs for then? So you can write everything yourself? And to send orders by fix directly to the broker?

What is that nonsense? That you have ready data in the buffer? It's been done more than once in 4 to speed things up.
 
Artyom Trishkin:
Everything there works. But sometimes access is denied. Maybe because of timeseries updates - I don't know. When it refuses, you have to repeat the request, because the first request activates the data swap.

If everything worked, there wouldn't be a million topics devoted to this problem.

The logic just turned out to be more complicated than the terminal users are ready to handle.
And there are probably errors, but the developers don't have the leisure to look for them, and no one wants to reproduce and prove them among the users either.

 
Artyom Trishkin:
What's the delusion? That you have ready data in the buffer? This was done more than once in 4 to speed things up.

The nonsense is in organising your own copy of the data, which is already available in the terminal.

 
Eugeni Neumoin:

The bar is there. The function does not always produce a -1. I believe this is just this from the MT5 language description:

"...Data availability

Availability of data in HCC format or even in ready-to-use HC format does not always mean the unconditional availability of these data for displaying on a chart or for use in mql5-programs.

When accessing price data or indicator values from mql5-programs , one should keep in mind that it is not guaranteed to be available at a certain point in time, or from a certain point in time..."

iBarShift() works the same in both terminals. And they return the same return codes under the same conditions.
 
Artyom Trishkin:
I've made many indicators that way - on timeseries classes. There everything is there, and it does not differ from ordinary work with indicators. But in addition - a lot of conveniences.

Still, it is better that the language functions work properly without these contrivances. Either the language was done in the way you suggest. That is, so that the programmers do not invent something in their own way with discussions on the forum, the language should be implemented, perhaps through some additional functions, without failing access to timeseries.

 
Artyom Trishkin:
iBarShift() works the same in both terminals. And the same return codes are returned under the same conditions.

Why, then, does the language description contain the quote I gave? If everything works fine, why write in the language guide that access can be denied at any time?

And when there is a denial of access and developers are honest about it, so there are a lot of threads on the forum. And EVERY! programmer encounters this problem. And everyone tries to solve this problem in his/her own way. Some of them can do it and some cannot.

Literate developers create libraries, e.g. tensorflow, so that people don't feel agony. And here... Well, at the beginning of the thread, everyone read Renat's answers...

Reason: