Discussion of article "Library for easy and quick development of MetaTrader programs (part I). Concept, data management and first results" - page 3

 
Stanislav Korotky:

If you leave it "for now", then you will have to change a lot of code if you redesign localisation. What's the difficulty of connecting strings from "resource" libraries or headers at once?

So maybe Artem is not looking for easy ways) Moreover, he said that the library development will be step-by-step with regular code refactoring.

 
Stanislav Korotky:

If you leave it "for now", then you will have to change a lot of code if you redesign localisation. What is the difficulty in connecting strings from "resource" libraries or headers at once?

Everything has its turn. At this stage of library creation, it doesn't have a message class yet. When it is created, everything will be. I am not trying to run ahead of the locomotive and stick to the principle "from simple to complex", moreover, I have already written:

Forum on trading, automated trading systems and testing trading strategies

Discussion of the article "Library for easy and fast creation of programmes for MetaTrader (Part I). Concept, data organisation, first results"

Artyom Trishkin, 2019.02.27 19:25

Well the return of structures is planned as an additional feature at the request of the user - purely for convenience. There further it will be seen. In any case - the library is created "on the fly" with a description of the steps of its creation, with the introduction of changes. So further it will be seen how to make "not expensive".

However, I have already done it. Now I'm just describing it in a structured way, while at the same time putting everything in order for myself.

And in general - I am used to doing "from simple to complex", but thinking in advance "what's next" - so as not to get stuck in the need to revise the concept, from which no one is immune.


 
Artyom Trishkin:

Everything has its turn. At this stage of the library's creation, it does not yet have a message class. When it is created, everything will be. I am not trying to run ahead of the locomotive and stick to the principle of "from simple to complex", moreover, I have already written:

I read that. It's just that if the work plan hasn't reached localisation yet, why did you have to put it in as it is now? In general, the owner is the boss, the question is rhetorical.

 
Stanislav Korotky:

I read that. It's just that if the work plan hasn't reached localisation yet, why did you have to put it in as it is now? Anyway, the boss is the boss, it's a rhetorical question.

The plan has long been painted. And I won't change it. This is only the first part - the very beginning, a story about the general concept, without details. And if you are attentive, your question is very strange.
It is strange to make claims to the frame of the car that it does not have a hatch in the roof of the body, which you have not yet seen.
 
Artyom Trishkin:
The plan's been in place for a long time. And I won't change it. This is only the first part - the very beginning, a story about the general concept, without details. And if you are paying attention, your question is very strange.
It's strange to make a claim about a car frame that it doesn't include a hatch in the roof of the body, which you haven't seen yet.

Ok, if you continue with the car analogy, there is already a webasto sunroof attached to the frame for some reason, which has nothing to do with the overall concept, and will require replacement. The question was not about the plan or the whole car, but about an unnecessary part (unnecessary work now and unnecessary rework in the future).

 
Stanislav Korotky:

Ok, to continue with the car analogy, there is already a webasto hatch attached to the frame for some reason, which has nothing to do with the overall concept and will need to be replaced. The question was not about the plan or the car as a whole, but about an unnecessary part (unnecessary work now and unnecessary rework in the future).

When debugging, if you need to output something to the log, do you write a whole class to output log entries to you in the Tombo language? Especially if you need to show this output in an article? You can't show the debugger in an article. In general, I won't run ahead of the locomotive. Especially since the class is planned and will be shown in the article where it is appropriate and contextual.
 
fxsaber:

It is expensive to return a structure. For the same reason CopyRates are several times more expensive than CopyClose.

Really? I just assumed that the built-in structure should work efficiently. i.e. if I need to copy all MqlRates fields, then using CopyRates should be more efficient than using CopyTime, CopyOpen, CopyHigh ... all eight functions in sequence.
 
alex_all:
Really? I just assumed that the built-in structure should work efficiently. i.e. if I need to copy all MqlRates fields, using CopyRates should be more efficient than using CopyTime, CopyOpen, CopyHigh ... all eight functions sequentially.

functions CopyClose, CopyHigh, High[], Low[], etc. There are a lot of places where specific indicators are used without having to refer to the whole bar.

 
alex_all:
Really? I just assumed that the built-in structure should work efficiently. i.e. if I need to copy all MqlRates fields, using CopyRates should be more efficient than using CopyTime, CopyOpen, CopyHigh ... all eight functions sequentially.

Still, giving out a pointer to an object, from which you can get all its properties in the programme, will be faster than copying all the object's properties into the structure passed to the class by reference.

 
Artyom Trishkin:

Still, it will be faster to give out a pointer to an object, from which you can get all its properties in the programme, than to copy all the object's properties into a structure passed to the class by reference.

I understand correctly what you want to say - CopyRates performs real copying of data into a structure, while the CopyOpen... family performs virtual copying (i.e. overwriting the structure). - is virtual (i.e. overwriting a reference to an existing array)?

It's just that creating a structure built into the platform makes sense if there are implemented mechanisms of working with it that don't reduce the speed too much.