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

 
Vict:

fxsaber is correct - there is one option

It's a bit kitschy - EXPR will be calculated twice, but it's still more flexible. Can't say it's universal (only for arithmetic types. The error value must be equal, which is unpleasant. Tried to work around it via explicit structure/function specialization, but it's not possible.

Greetings!

I'd like to open a new topic, I can't formulate the problem... I have problems with it )))) But the material is quite fresh and interesting

You have done a great job, would like to finalize it - usability ( @fxsaber has all his work once plugged in with one inluder) is practical!

And to make it all look professional, you should use C++ / C# syntax (or get as close as possible)

 
Artyom Trishkin:

I can give you my opinion:

Let's make quietly from what we have at the moment, don't whine, help find bugs and ask with the expectation of fixes - they do get fixed and new nice features appear.

I agree with this approach.

---------

I have partly had some sort of cache from the very first versions already. That is, I have created arrays with time, values of minima and values of maxima for the first 10 zigzags extrema.

In the version for MT5, I also added an array containing bar numbers. For the first 10 extrema. This helps in most cases. Only non-standard bindings are affected in MT5.

I will not create a full cache for available history for all 21 timeframes. Your computer memory will not be enough with this approach.

For understanding: some enthusiasts display up to 9 indicators for MT4 on one chart. There are many charts for various currency pairs opened at the same time. And they all have 9 copies of the indicator. This application of the indicator is implemented for the system DML&EWA created by Putniuk. He himself has output up to 72 instances of the indicator. That is, on 8 currency pairs.

When using it in this way, an additional cache of 21 TFs together with 28 buffers will load the memory very much.

This is only taking into account the memory load. It is too tiresome to redesign a large code for using the cache instead of iTime, iLow, iHight, iClose, iBarShift functions

=================

I've been through such marathons several times.

1. A marathon on including several external zigzag indicators in the body of the main program. Got rid of the external indicators in order for the market to accept the program.

2. Conversion of all single-buffer zigzags to double-buffer ones. This took about half a year.

3. Creating the graphical interface. Took a total of somewhere over 2 years. About 3 years. And there are more interesting ideas for graphical interface. But I don't have enough courage to implement them yet.

4. Originally tried to translate from MT4 to MT5 a year ago. I didn`t succeeded then. I can do it now. But I am not satisfied with the quality of translation.

There were other marathons as well.

Creating a cache can lead to a dead end. It's dangerous to mess with...

------------

Artem, your approach (quoted above) is fully supported.

 
Again, here's a quote from the first post:

...quote from the MQL5 language guide. Under the heading Organisation of data access.

"...Data accessibility

Availability of data in HCC format or even in HC ready 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 moment of time, or from a certain point in time...".

--------------

The problem remains.

The program has several hundreds of accesses to the quotes history in different parts of the program. The program listing contains about 50 000 strings.

Sometimes because of the specifics of accessing the history the value -1 is returned. The consequence of this is an error - an array overrun. There are also other errors. In some fragments of the program I checked if -1 is returned when accessing the history. When receiving -1 in this case individual itemsof the graphical constructions are not drawn. If we add a couple of hundreds of checks to the code, it will cause lags which already exist due to peculiarities of accessing the history.

It is possible to create a program for MT5 as well. But it requires changing the entire architecture. I don't have time for such exploits.

I have decided that there is no need in such a useless task. The program works in MT4. I`m not planning to switch to MT5. I`ve made ZUP for MT5 free.

I have made ZUP free for MT5. Everybody who wants may download it and see how it works on MT5. And also compare it with my version on MT4.

Now I am done with MT5. It is just a waste of time.

I have posted similar messages at some other forums.

 
Renat Fatkhullin:
And can you reproducibly demonstrate data inaccessibility?

You assert without reproducible evidence.

The servicedesk describes how to reproduce the problem. The source code for reproducing the problem is there too.

==========

Text from MQL5 documentation https://www.mql5.com/ru/docs/series/timeseries_access :

Data availability

The 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 display on a chart or for use in mql5 programs.

When accessing the price data or indicator values from mql5-programs, we should remember that it is not guaranteed to be available at a certain moment of time, or from a certain point in time. This is due to the fact that MetaTrader 5 does not store the full copy of the required data for mql5-program, but gives direct access to the terminal database in order to save resources.


This text, translated into Russian, means the following. No matter what you do at any time access to the data may be unavailable.

That is, there is no way to avoid errors due to interruption of data access.

This is how I understand this text.

Документация по MQL5 - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Документация по MQL5 - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
  • www.mql5.com
MetaQuotes Language 5 (MQL5) - язык программирования технических индикаторов, торговых роботов и вспомогательных приложений для автоматизации торговли на финансовых рынках. MQL5 является современным языком высокого уровня и разработан MetaQuotes Software Corp. для собственной торгово-информационной платформы. Синтаксис языка максимально близок...