Algorithms, solution methods, comparison of their performance - page 14

 
Sergey Dzyublik:

1. it makes no sense. Algorithms are compared as a whole on relative results.
2. The solution is already integrated - it's a standard library<Generic\ArrayList.mqh>.

1. that is, the speed of the algorithm is not important. The solution is "conceptually-powerful" and that's enough. Ok.

2. So, you just plug in via the plug-in and that's it? Ok.

//--------------------------------------------------------------------

If the main criterion for evaluating the algorithm is"Conceptually Powerful", then I've lost.

If the algorithm's main criterion is " Simplicity, speed and convenience ", I win.

At this point we can close the subject.

 
fxsaber:

  1. For what reason is the style such that interfaces are written first, and only then classes (as descendants of their respective interfaces)?
  2. Why is this done? (StringToUpper(generatorName);)
  3. Obviously, they just forgot.




Somewhat surprised that they did it via CArrayList instead of using the just discussed HashMap. Shouldn't have been guided by the author's crooked original, where transactions are indexes, not tickets.

HashMap would have been clearer, more practical and faster, most likely.


Surprised myself that such code read easily. However, I haven't reached the abstraction level shown in programming myself yet. My style so far is procedural + OOP. This code is pure OOP. Apparently it is some well-learned programming school. OnlyStanislav Korotky's work on this site has a similar level of abstraction.


1) The style is such for integration.
If you need to test your class, you may inherit and implement the interface for the test.
If you need your own generator, you may inherit it.


2) Yes, that's redundant, overkill, thanks:

StringToUpper(generatorName);



3) No, I haven't:

      //TODO add shared_ptr / move out generator (Dependency Injection)
      IGenerator<T>* generator = CreateGenerator<T>();

It was originally written undershared_ptr, which I don't have an implementation of.
But it's a good idea to putIGenerator<T> dependency into function parameters for testing.

 
Sergey Dzyublik:

3) No, I didn't forget:

It was originally written undershared_ptr, which I don't have an implementation of.

I see, I hadn't noticed.

 
Stringlength, do you know how many characters maximum?
 
Renat Akhtyamov:
String length, don't know - how many characters maximum?

I am waiting for an answer:

Forum on trading, automated trading systems and trading strategy testing

Algorithms, solution methods, comparing their performance

Vladimir Karputov, 2017.12.11 08:37

Correct me, but isn't the string length finite?

https://msdn.microsoft.com/ru-ru/library/sx08afx2.aspx

I just can't find this limitation for MQL5...


 

There is a clear pattern of repeated disrespect for the community and a clear pattern of provocation.

Not reading it (a person's posts in various constructive threads) is not always possible, after which to develop and forget it - even less so.

Trolling and spitting in the hands of help, the number of which greatly distinguishes this resource from the positive side.


Could be wrong.

 
Vladimir Karputov:

Correct me, but isn't string length finite?

Memory limit only

void OnStart()
{
  string Str;
  
  Print(StringInit(Str, 1 e8)); // true - 100 Mb
}
 
Реter Konow:

1. that is, the speed of the algorithm is not important. The solution is "conceptually-powerful" and that's enough. Ok.

2. So, you just plug in via the plug-in and that's it? Ok.

//--------------------------------------------------------------------

If the main criterion for evaluating the algorithm is"Conceptually Powerful", then I've lost.

If the main criterion for evaluating the algorithm - "simplicity, speed and convenience" - then I win.

You can close the theme on this point.


Sorry, you can not, I repent.
But what a stupid person you are.
The problem is not that someone doesn't know something, but the total lack of desire to learn something.

What difference does it make 10ms one or 8ms the other.
If you just need to relatively compare who is faster and by how much, while remembering to check the fidelity.

 
fxsaber:

Memory restriction only

OOO !!!!!

Thanks a lot!

because my string is undercut and I didn't know how to increase the length

Don't ruin the thread, don't fight here.

 

solution across the sheet - so much code.... Couldn't you be more specific?

I'm just trying to make it clear to others)

In general, I myself also can not get into the habit of using the standard libraries - and I think a lot of people here have their own versions of the same sheet.

same problem

i.e. we save all values, ticker - Magik TP and SL comment, open price, time, close price - let's say it will be for accounting of virtual orders

In fact, the fastest solution would be to store all the information in the structure. And here accesses will be made through ordered reference index sammiva.


By the way, the question how to define a print. may be some ready-made solutions. In a nutshell it should print not so often - but before failure it would dump the necessary information, or somehow conveniently adjusted in this way - and preferably without the global variables