Libraries: TimeSeries - Function Library for Working with Time Series - page 3

 
Interesting:

My code, however, seems to me to be more in line with MQL4 (there may be other variants)

by types of input parameters

My code is sometimes 3-4 times larger.

sorry :)
[Deleted]  
sergeev:

by type of input parameters

Not only by type, but it doesn't really matter.

Such a direct implementation (head-on) in my opinion is "ETERNAL DAY", it is not universal and can cover only a certain part of tasks.

 
Interesting:

Not only by type, but it doesn't really matter.

Such a direct implementation (head-on) in my opinion is "ETERNAL DAY", it is not universal and can cover only a certain part of tasks.

well, what can be done when only one bar is needed in the Expert Advisor?

 

Thank you for your comments. I will answer everyone at once.

  1. The library is not positioned as a "migration from MQL4".
    I just called the functions that are often used in Expert Advisors and scripts by their usual names.
  2. The library was written in 1.5 hours and does not claim to be complete or optimal.
    I was ashamed to say that there may be bugs in the functions, although they can be, of course. I relied on solidarity in this matter ;)
  3. The functions presented in the library do not cover even half of the cases of working with time series.
    Naturally, if you need to get not the high of one single bar, but to go through the last 100 bars, it would be more optimal to do it quite differently.
Actually, I was very surprised when I didn't find such code in the database. The functions seem to be of everyday use.

So I propose to bring the bible up to date and use by the whole community. I will do it anyway, but help will be welcome.

Urain, thanks for the includnik, but it's a bit off topic.

 
hrenfx:

I guess we are talking about different things. On the example of an indicatorless MQL4 Expert Advisor:

  • We added the corresponding include.
  • Added the mentioned prefix to standard MQL4-functions in the source code by auto-replacement.
  • We edited the resulting MQL4 file a little bit to get the MQL5 file.
  • We got the same Expert Advisor, but for MT5.
Last year I started to do something similar, but due to frequent updates of MT5 builds I abandoned it, I can't find old developments, here is a sketch of how I would like to see a class for working with time series.
Files:
 
IgorM:
Last year I started to do something similar, but due to frequent updates of MT5 builds I abandoned it, I can't find old developments, so I sketched out how I would like to see a class for working with timeseries.

I wonder, will it be more optimal than copying only necessary data (like mine)?

I guess it depends on the frequency and volume of use....

All in all, it's not a clear-cut question.

On the one hand, you should copy everything that can be used, but try to do it less often (but then you will have to specify at once which series for which instruments/TFs we will use).

On the other hand, you can copy only necessary segments right before use. And only in heavy functions optimise access to long time-series.

It is necessary to check.

 
komposter:

I wonder if this would be more optimal than copying only the necessary data (like mine).

Although, probably, it depends on the frequency and volume of use....

the implementation itself is not important yet, hrenfx put the question correctly - it is important to quickly port mql4 codes to mql5, in my example I suggested replacing old functions instead of the prefix "MQ4_": MQL4_iTime, ..... with "MQ4.

using the search/replace editor menu you can port most of the mql4 codes quite quickly

 
IgorM:
Last year I started to do something similar, but because of frequent updates of MT5 builds I abandoned it, I can't find old developments, here I sketched out how I wanted to see a class for working with timeseries.
Yes... there are a lot of updates... If not for the approaching Championship, not soon I would sit down for MT5.
 
You wonderful human being.