Errors, bugs, questions - page 84

 
Rosh:
The article The Order of Object Creation and Destruction in MQL5 was written to answer such questions. Insert Print in the constructor and you will see everything (the order of calls)

I have figured out the order,

But how to get a trade ticket in an embedded structure when creating a position object?

 
Interesting:

Lord, I've written and I don't even know what I've written, but try this.

The way I understand it, it goes something like this.

I also was pondering over this way, the disadvantage is that the pseudo constructor is not automatic and when you create an object you have to call it again, and you can't always tell if the object was created or is it the second call. And that, as they say, is two big differences.
 
Interesting:

It will only load the history once for each pair.

Then there will only be a clean test.

Here, try running the test again. The idea is that it should fit in 2-3 minutes...

5 minutes off.

So how do you use the code to load the history?

 
gumgum:

5 minutes, it's off.

So how do you use the code to upload the history?

I don't know, I have a 2 minute run from 01.01.200 without much logic (really)...

I think there was a story loading script somewhere, I'll have to look for it...

 
gumgum:

5 minutes, it's off.

So how do you use the code to upload the story?

Files:
 
Urain:
I also thought about it, the disadvantage is that the pseudo constructor is not automatic and when you create an object you have to call it, and it's hard to trace whether the object was created or it's already the second call. And this is, as they say, two big differences.

In other languages (Delphi, for example) you have to call constructors in a way, at least in MQL5 it's the first language I've encountered where the constructor is called immediately after declaration. At least MQL5 is the first language I've encountered where the constructor is called right after the declaration.

There were difficulties with calling the ancestor constructor (not to rewrite everything again), but this problem seems to have been solved.

 
Urain:

Thank you. I can't figure it out without 100g.)

Interesting:

I don't know, my test runs since 01.01.200 without any particular logic (it's true) takes 2 minutes...

I think there's a script for loading history somewhere, I'll have to look for it...


The run itself goes fast. It's just loading history data takes a long time, but if you put the start of trading in the ex. date and select a longer test period at (H1), then everything is fast.

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте - Документация по MQL5
 
gumgum:

Thank you. Not without 100 grams.))

The run itself goes quickly. It's just the loading of the history data at monthly takes a long time, but if you put the start of trading in the ex-date and select a longer test period at (H1) then everything is fast.

Other people's brains won't help you (c) That's why there are examples, to understand them.
 
Interesting:


I think there's a story loading script somewhere, I'll have to look for it...


This is described in the section Organising data access
 
Rosh:
This is covered in Organising data access
Thank you.