Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 65

 
trader781:

I don't know what this list should look like by ticket and pulling the desired result from it

Well, we selected a selection, then what?

In the loop, we have to look through each order and write its data into the array.

At the end of the loop, we should sort the array in ascending order. And then select the necessary order from the array.

 
Artyom Trishkin:

In the loop I have to go through each order and write its data into an array.

At the end of the loop, sort the array in ascending order. And then select the required order from the array.

Thanks of course, but how do I recover a burned EA now?

 
trader781:

Thanks of course, but how do I repair a burnt-out EA now?

Fill it with foam and take the embers to a repair shop.
 
Artyom Trishkin:
Fill with foam and take the coals to repair.
Have you ever had an EA cause the terminal to freeze and then overwrite it as unreadable?
 
trader781:
Have you ever had an EA cause terminal freeze and then rewrite it in unreadable form?
No. I haven't seen such miracles as yours in almost ten years of writing in mql4 and mql5
 
Artyom Trishkin:
No. I haven't seen such miracles as yours in almost ten years of writing in mql4 and mql5.

In short, I write my sequence of steps:

1) an empty array is declared at the start of the program

2) in the ontik after the order is submitted to add the ticket to the array, extraction is not written

3) I put overwrite with zeros in the order closing function

I pressed compile for testing - the terminal says "out of memory(file name)" and the terminal dies along with the Expert Advisor

I wonder what I could have done differently

 
trader781:

In short, I write my sequence of steps:

1) an empty array is declared at the start of the program

2) in the ontik after the order is submitted to add the ticket to the array, extraction is not written

3) I put overwrite with zeros in the order closing function

I pressed compile for testing - the terminal says "out of memory(file name)" and the terminal dies along with the Expert Advisor

i wonder what could have been done differently

When it happens again, search for "Crashes" in the shared folder without closing the terminal, archive it and send it to the CA attached to the archive. I had a similar problem, they said it was due to the peculiarities of the processor on which MT was not tested. Connected remotely and in 10 minutes fixed everything, put in the next build corrections. It is possible that your stone is something special.
 
Alexey Viktorov:
When this happens again, look for the "Crashes" folder in the shared folder without closing the terminal, archive it and write to the SD attaching this archive. I had a similar problem, they said it was due to the peculiarities of the processor on which MT was not tested. Connected remotely and within 10 minutes fixed everything, put in the next build corrections. It is possible that your stone is something special.

I know theoretically why this happened, so my question is, can we talk briefly about the use of arrays?

Where do you need to initialise, delete and process them to make them work?

P.S

when google banned it looks something like this:

Files:
6677.png  21 kb
 
trader781:

I know theoretically why this happened, so my question is, can we talk briefly about the use of arrays?

Where do you need to initialise, delete and process them to make them work?

P.S

when google banned it looks something like this:

It all depends on the need to use each specific array in a program. Therefore it is up to the programmer to create, initialise, resize, use and delete the array
 
Artyom Trishkin:
It all depends on the need to use each specific array in the program. Therefore, the creation, initialization, resizing, use and deletion of the array are at the programmer's discretion

need

1) create it somewhere (in a global area, as a function, in onit or ontic?)

2) write each ticket in it when sending an order, giving it a number in order

3) pull them out from there as needed through the number

4) Set the parameters to zero when closing the entire grid