Servicedesk. Complaints, suggestions. - page 3

 
Alexey Kozitsyn:

If only because it is stated in the documentation and I want to use it.

To download and check history, similar to MT5: https://www.mql5.com/ru/docs/series/timeseries_access

I repeat the question, do you know how to get this date by means of old mql4?

For me the presence of a function in documentation is not a sufficient reason to deal with service desk and forum, wasting time and effort if I don't need it in principle. And why it may be necessary you, in my opinion, have never been able to argue.

I personally do not recommend anyone to use in MT4 the functions of API of MT5, because they have been glitching like this for a long time, ever since the "modernization" of MQL4. And I won't recommend their use from now on unless someone proves their absolute necessity.

 
Ilya Malev:

For me, the presence of a function in the documentation is not a sufficient reason to deal with servicedesk and on the forum, wasting time and effort if I don't need it in principle. And in my opinion, you haven't been able to argue why you might need it.

I personally do not recommend anyone to use in MT4 the functions of API of MT5, because they have been glitching like this for a long time, ever since the "modernization" of MQL4. And I will not recommend their use in the future unless someone proves their absolute necessity.

You still haven't answered my question. But I realized that you don't care, and you're satisfied.

Oh, and one more argument - portability of programs from MT4 to MT5 and back.

 
Alexey Kozitsyn:

You still haven't answered my question. But I understood that you don't care and you are fine with it.

Oh, and one more argument - the portability of programs from MT4 to MT5 and back.

If you have a restriction on the number of bars in the MT4 window, you will not know how many bars are on the server. And I have not encountered a regular situation when it would be necessary. Of course, you can invent a lot of exotics, but in 99.9% of cases we can do without it.

As for portability - these are totally different platforms with fundamentally different methodology of working with data and orders. Therefore their programming methodology is completely different. For portability, there is the __MQL4__ directive and libraries with conditional compilation.

 
Ilya Malev:

It is not possible to know how many bars are on the server if you have a limit on the number of bars in the MT4 window. And I haven't encountered a regular situation when it would be necessary. Of course, you can invent all sorts of exotics, but in 99.9% of traders' tasks, you can practically do without it.

As for portability - these are totally different platforms with fundamentally different methodology of working with data and orders. Therefore their programming methodology is completely different. For portability, there is the __MQL4__ directive and libraries with conditional compilation.

Is organization of access to the data "exotic"? Ahem. Ok.

The trader doesn't care about the language, the trader needs to trade, and the Expert Advisors/indicators/scripts must work properly. How they work is the programmer's problem. But the programmer, in order to write a quality product for the trader, must pay attention to such small details as data access.

And if you have not encountered something, it does not mean that others have not.

 
Alexey Kozitsyn:

Organising data access is 'exotic'!? Ahem. Ok.

Traders do not really care about the language, the trader needs to trade, and the Expert Advisors/indicators/scripts must work properly. How they work is the programmer's problem. But the programmer, in order to write a quality product for the trader, must pay attention to such small things as data access.

You have never cited a single real task for which this function is required. Only pretty words like "data access" and an admission that you need this function just because it's described in the documentation.

There are enough functions in MT4 API for data access, in my opinion, there is absolutely no need to get into functions for MT5. There is no need to find out the number of bars on the server in MT4, because there is no need to load history programmatically - the terminal itself does it before accessing the MT4 data access functions (iHigh, iLow, MarketInfo, etc.).

Which is very convenient and it's a pity that it was changed in MT5, which created a lot of difficulties with access to data there

 
Ilya Malev:

You still haven't cited a single real task for which this function is needed. Only pretty words like "data access" and an admission that you need this function just because it's described in the documentation.

There are enough functions in MT4 API for data access, in my opinion, there is absolutely no need to get into functions for MT5. There is no need to find out the number of bars on the server in MT4, because there is no need to upload the history programmatically - the terminal does that.

Which is very convenient and it's a pity that it was changed in MT5, which created a lot of problems with access to data there

I even gave you the link:

Forum on trading, automated trading systems and testing trading strategies

Service Desk. If you have any questions or comments about the Service Desk, please do not hesitate to contact us.

Alexey Kozitsyn, 2015.10.30 17:11

At least because it is stated in the documentation and I want to use it.

To download and check history, similar to MT5: https://www.mql5.com/ru/docs/series/timeseries_access

I have a history check/upload function written on mql5 similar to how it is described in the link. Everything works as it should. And I wanted to use the same in mql4 program. I have copied the code and found that the SeriesInfoInteger() function works incorrectly. I wrote an application to Sersidesk. Why shouldn't I use the existing code if all functions are duplicated in both languages?

As far as I understood you at first were writing for mql4 and then switched to mql5. On the contrary, I've actively started to write in mql5, and then - in mql4. So, for me it's more convenient to use new functions.

 
And if you compare the documentation for organizing access to data from mql4 and mql5, it becomes clear that the access is the same. It's just that mql5 documentation is extended with an example of access. So, it is still a big question whether this access is so different.
 
Alexey Kozitsyn:
And if we compare the documentation for data access from mql4 and mql5, it would be clear that the access is the same. It's just that mql5 documentation is extended with an example of access. So, it is still a big question whether this access is so different.

A simple example is that one indicator calls another by iCustom. And this other indicator, in its turn, also calls the third and fourth one. And all these indicators are built a little longer than a few milliseconds. When running such a construction at the weekend, the user won't wait for the indicator to be created until the weekend is over, unless he regularly presses the "Refresh" button in the chart. Because of this problem I had to make a whole system of classes instead of iCustom for calling each other with indicators, bypassing iCustom. In MT4 there was no such a pain in the ass.

In MT4, the indicator is built first, and then the code that uses its data is called. The same thing is mostly done with time series. In MT5 everything was changed not for the better.

 
Ilya Malev:

A simple example is that one indicator calls another by iCustom. And this other indicator, in its turn, also calls the third and fourth one. And all these indicators are built a little longer than a few milliseconds. When running such a construction at the weekend, the user won't wait for the indicator to be created until the weekend is over, unless he regularly presses the "Refresh" button in the chart. Because of this problem I had to make a whole system of classes instead of iCustom for calling each other with indicators, bypassing iCustom. In MT4 there was no such a pain in the ass.

In Mt4, the indicator is built first, and then the code that uses its data is called.

Try to use the timer events. I.e. start the logic of all calculations at the output in the timer. Next, if the indicator does not appear in the window - press refresh once. Everything should work.
 

Alexey Kozitsyn:

Try to use timer events.

Timer events are actually a subclass of ChartEvent, and are called only when the indicator is launched directly on the chart. In indicators called through iCustom, you will not wait for either OnTimer or OnChartEvent call

There, one indicator starts drawing only after the other one has been drawn. You need to press refresh once to build the first, farthest in the chain, then once again to build the one that uses its data :)

Because, the indicator in its thread cannot wait for data building of another indicator, without coming back from OnCalculate. It is also a nice feature. So, the user will always face the chart menu instead of working with data.

Reason: