Errors, bugs, questions - page 1937

 
Renat Fatkhullin:
I'm sorry, but I have absolutely no time to deal with teaching programming to every single beginner. Especially when you see that the person hasn't even gone through the basics of understanding programming and he asks trivial things.


But I'll show you the direction:

  1. MQL5 documentation
  2. Codebase
  3. Articles
  4. Forum (not in "write for me, why don't you teach me and do my job?" mode)
  5. Freelance (they can write it correctly here)
  6. Independent work with thoughtful analysis "why should this wrapper slow down and waste resources, maybe rewrite optimally?"
  7. Using a profiler that shows the real consumption of resources in each line of code

Thanks Renat!

I was not mistaken in you!

I suggest to get the right to download ME and communicate with you in essence to provide through the LC a diploma of higher education in the field of "Programmer".

 
Alexey Viktorov:

I have no desire to communicate in this way. Instead of trying to understand what's being said, to work out what's going to happen, some incredible objections are thrown out.

Why are you imagining things? I understood your idea and confirmed that it works, and it will have an effect, if the request is done only once and if you know how many bars are needed for the EA to work.

Or maybe you suggested to use the structure in a different way? Then please explain, but do not be offended!

 
Aleksey Vyazmikin:

I suggest that in order to obtain the right to download ME and communicate with you in essence provide a diploma of higher education in the field of "Programmer" through the LC.

Heh... A university degree is no guarantee of anything.

Basically, I can offer you this variant (I didn't check correctness of code, only for tester, current symbol, current period):

double iClose(int index)
  {
   double arr[ 1 ];
   return( ( CopyClose(_Symbol,_Period,index,1,arr) == 1 )? arr[ 0 ] : WRONG_VALUE );
  }

You can do the rest of the functions by analogy.

 
Renat Fatkhullin:
I'm sorry, but I have absolutely no time to deal with teaching programming to every single beginner. Especially when you see that the person hasn't even gone through the basics of understanding programming and he asks trivial things.


But I'll show you the direction:

  1. MQL5 documentation
  2. Codebase
  3. Articles
  4. Forum (not in the "write for me, why don't you teach me and do my job?" mode)
  5. Freelance (they can write it correctly here)
  6. Independent work with thoughtful analysis of "why should this wrapper slow down and waste resources, maybe rewrite optimally?"
  7. Using a profiler that shows real consumption of resources in each code line

Why don't we start a thread on best (most efficient) practices of programming directly on MT5? There was, for example, a branch on realization of iBarShift. Other nuances can be improved together too. People, in general, do not want to learn how to program, but to quickly and comfortably build an Expert Advisor - sorry, but that's how it is. And the expert, of course, should not slow down or crash. If you could, like ready-made bricks, put together "just right", it would be great. Because there are all sorts of "what's not right" everywhere. And it's not always obvious what the "wrong" is. How about "the right way"?

The documentation is pretty minimalist in many aspects.

Codebase is a big pile which one must dig through consciously and intelligently for days to find the right code.

Articles - as a rule, the authors and highly specialized, more in the trade than programming (yet the direction of the resource must be considered), and those that are about programming - mostly about the gimmicks.

This is where the forum is. They ask questions here and we send them to... here, too.

Freelancing is not a guarantee of best practice or training.

Self-employment, including with a profiler - of course present, but not enough time for everything. Something I want to take in the form of ready-made building blocks.

 
Aleksey Vyazmikin:

I suggest that in order to be allowed to download ME and communicate with you on the merits, you should provide a degree in Programming via the LC.

You don't need a diploma to communicate, but you do need one to say "And where's the praised speed of MT5?".

You have been pointed out your mistakes several times, but instead you continue to bend the line of "I have a right not to know, teach me seven!".
 
Alexey Kozitsyn:

Heh... A university degree is no guarantee of anything.

Basically, I can offer you this variant (I didn't check correctness of code, only for tester, current symbol, current period):

You can do the other functions by analogy.

Thank you! I will try to do by your recipe.

About the diploma - I agree, but there are industries where you can't work without it - for example, to conduct business in court as a representative for CAS cases. However, in this way developers can not waste time on traders, but pay attention to programmers, and as a product, be at a higher level in the ranking of programming languages.

 
Stanislav Korotky:

Why don't we start a thread on best (most effective) practices in programming directly for MT5? There was, for example, a branch on implementation of iBarShift. Other nuances can be improved together, too. People, in general, do not want to learn how to program, but to quickly and comfortably build an Expert Advisor - sorry, but that's how it is. And the expert, of course, should not slow down or crash. If you could, like ready-made bricks, put together "just right", it would be great. Because there are all sorts of "what's not right" everywhere. And it's not always obvious what the "wrong" is. How about "the right way"?

The documentation is pretty minimalist in many aspects.

Codebase is a big pile which one has to deliberately trawl for days to find the right code.

Articles - as a rule, the authors and highly specialized, more in the trade than programming (yet the direction of the resource must be considered), and those that are about programming - mostly about the gimmicks.

This is where the forum is. They ask questions here and we send them to... here, too.

Freelancing is not a guarantee of best practice or training.

Self-employment, including with a profiler - of course present, but not enough time for everything. Some things I want to take in the form of ready-made bricks.

I totally agree with you!

I get rebuked for doing it 'wrong' and sent to the place where I learned it...

 
Renat Fatkhullin:

You don't need a diploma to communicate, but you do need one to say "And where is MT5's lauded speed?".

You have been pointed out your mistakes several times, but instead you keep bending the line of "I have the right not to know, teach me seven!".

Emotions have not been cancelled - I reported them in the hope for help!

I want to be wrong, I am ready to change the code, but I want to believe that everything will not be in vain!

I don't agree with you that I am claiming "I have a right not to know, teach me seven!" - in terms of the obligation to teach - I personally expected help from you, as an expert, and specific advice on how things should be done.

Each author's method I consider and try, which follows from this thread and for which they are "thank you!".


 
Aleksey Vyazmikin:

You have already been advised on a ready-made solution -https://www.mql5.com/ru/code/18305

Based on your requirements:

I have loops in my code, the amount of calculations may not be known beforehand.

I have cycles in my code and the amount of calculations may not be known.

Высокопроизводительная библиотека iTimeSeries
Высокопроизводительная библиотека iTimeSeries
  • votes: 20
  • 2017.05.25
  • nicholishen
  • www.mql5.com
Эта библиотека предоставляет молниеносный доступ к таймсериям для реализации привычных методов MQL4 (например, iBarShift) в чувствительных к задержкам приложениях на MQL5.
 
Alexey Kozitsyn:

Basically, I can offer you this variant (I didn't check the correctness of the code, only for the tester, current symbol, current period):

You can do other functions by analogy.

Tried your variant - within the margin of error change

Was:
2017.07.21 17:23:20.046 Core 1 Si-9.17,M1: 107509 ticks, 35385 bars generated. Environment synchronized at 0:00:00.032. Test passed in 0:02:52.037 (including ticks preprocessing 0:00:00.031).
2017.07.21 17:23:20.046 Core 1 Si-9.17,M1: total time from login to stop testing 0:02:52.069 (including 0:00:00.032 for history data synchronization)
2017.07.21 17:23:20.046 Core 1 351 Mb memory used including 32 Mb of history data, 64 Mb of tick data

Became with your code
2017.07.21 17:27:37.393 Core 1 Si-9.17,M1: 107509 ticks, 35385 bars generated. Environment synchronized at 0:00:00.031. Test passed in 0:02:58.013 (including ticks preprocessing 0:00:00.031).
2017.07.21 17:27:37.393 Core 1 Si-9.17,M1: total time from login to stop testing 0:02:58.044 (including 0:00:00.031 for history data synchronization)
2017.07.21 17:27:37.393 Core 1 352 Mb memory used including 32 Mb of history data, 64 Mb of tick data

MT4
2017.07.21 17:27:57.070 RUBRUR,M1: 225314 tick events (35701 bars, 231783 bar states) processed in 0:00:04.306 (total time 0:00:11.357)

Reason: