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

 
Aleksei Stepanenko:

Nah, far from a professional.

I meant..... compared to me :-)

Got everything except the answer to this question

1.If the final execution of this function causesdst[j][i] to get new values of indexesdst[7][2], then why were there loops involved? Couldn'tdst[j][i] be assigned these index values directly and explicitly? Besides, as I now understand, the array with its element values is not "rotated" in this code. This code calculates only new array index values ..... if I understand correctly, of course.

Thanks for the valuable information.

 

We are not assigning indices, but transferring element values from one array to another.

Indexes are the address of the element where it is in the array.

What's in the source of the row is in the destination of the column, and vice versa.

You need to move the values of each element, not just the last one.

A loop in a loop is used to do this. One loop on rows, the other on columns.

The picture shows the addresses of the elements in the cells. We copy the values of the elements to these addresses.

In total we have to copy: 7 * 2 = 14 element values.

This is where we copy the values (as if we had expanded the array, in fact, we originally made the arrays mirrored, but here we simply copied the values from array to array, in the order we want)

 
Aleksei Stepanenko:

We are not assigning indices, but transferring element values from one array to another.

Indexes are the address of the element where it is in the array.

What's in the source of the row is in the destination of the column, and vice versa.

You need to move the values of each element, not just the last one.

A loop in a loop is used to do this. One loop on rows, the other on columns.

The picture shows the addresses of the elements in the cells. We copy the values of the elements to these addresses.

In total we have to copy: 7 * 2 = 14 element values.

It is in this code that we copy the values (as if we had unfolded the array, in fact, we originally made the arrays mirrored, but here we simply copied the values from array to array, in the order we want)

Got it now. Thank you very much. Sorry for being dumb and making you do such a huge job.... especially on drawing....

 
Aleksei Stepanenko:

So have you tried making the variables global?

Yes, thank you. I did what you said. Turns out it was that simple.

 
Vitaly Muzichenko:

Alternatively, the simplest and easiest condition

OnTrade() is the analogue for mt4 with mt5

Thank you. Really simple condition. I have put it in global variables for now, but your variant is very interesting and will be carefully studied later.

 

You're welcome, guys.

 

Thank you all!

 

Colleagues - help - stuck navigator somewhere - can't find it - help...


here's the key - pressed - released - no navigator anywhere on the screen and in the corners....

the other windows are there - i have the navigator somewhere - can't find it - help me... please don't fuck around...

Maybe I need to select something in the settings?


Colleagues - problem solved - restarted the terminal



 
Roman Shiredchenko:

Colleagues - help - stuck navigator somewhere - can't find it - help...


here's the key - pressed - released - no navigator anywhere on the screen and in the corners....

the other windows are there - i have the navigator somewhere - can't find it - help me... please don't fuck around...

Maybe I need to select something in the settings?


Colleagues - problem solved - restarted the terminal

Press ctrl+n.

 
Roman Shiredchenko:

Colleagues - help - stuck navigator somewhere - can't find it - help...


here's the key - pressed - released - no navigator anywhere on the screen and in the corners....

the other windows are there - i have the navigator somewhere - can't find it - help me... please don't fuck around...

Maybe I need to select something in the settings?


Colleagues - problem solved - restarted the terminal.



I tried to open them but they open and stick to the top, sides, bottom, and they may not be visible in charts and ktrl N does not help, windows are not visible and open in minimized form. Profile does not always help, it only displays the right charts. All in all, knowing all that with the mouse I pulled it off and the window was glued to the top and fumbling (accidentally) at the top (another great task), where it attaches to the mouse, I once again extremely unsuccessfully pulled it off and it disappeared. It was open, but not visible under the windows. Closed all the charts and saw the edge of the rolled up window, unfolded it, it stuck to the top... ))) After a few hours I learned how to peel it off from the top and sides. Already wanted to create a help topic))))

Now I try not to fool around with windows and panels)))