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

 
trader781:

Hi all, how do I write the expression

the fifth lot is equal to the sum of lots 1 and 4

to find the first or the last of all can be found via the ticket definition

but how to find any intermediate one given the constant change in the current grid?

To constantly monitor the orders, go through them and sort them.

This means that each order must be somehow and somewhere stored.

Every order is stored on the server and information about any of them is available at any time.

What is the difference?

between

void OnTick()
  {
    if uslovie1==true   {...}
    if uslovie2==true   {...}
    if uslovie3==true   {...}
  }

И

void OnTick()
  {
     {
        if uslovie1==true
                   {...}
        else  if   {...}
        else  if   {...}
     }
  }
There is a difference between the two. In the first variant the conditions will be checked one by one, regardless of the result of the previous condition, in the second variant, each next condition will be checked only if the previous one was false.
 
Ok, can I give you an example?
Find the 6th order order in the grid
 
trader781:
OK, can you give me an example?
Find the 6th order order in the grid

It depends on what you need to find. You can find the 6th by lot size, you can find it by time, you can find it by price, and they will all be different. Also, please specify whether you want to find the 6th order in all of them at once or in a bystop or sellstop.

You tell me which one you want.

 
Vitaly Muzichenko:

It depends on what you need to find. You can find the 6th by lot size, you can find it by set time, you can find it by set price, and they will all be different. Also write down which one to search for, buystop or sellstop, or all of them at once to find the 6th?

You tell me which one you want to search for

By ticket.
I need the principle itself, I already have the first and the last.


 
trader781:
By ticket number
I need the principle.
The principle will be different depending on what exactly you need - if by ticket - one principle, if by time - quite another. And you can search by any value, not only by ticket or time.
 
Artyom Trishkin:
The principle will be different depending on what exactly you need - if by ticket, one principle is the same, if by time, then a completely different one. And you can search by any value, not only by ticket or time.

I need order 6 in the grid open, search by ticket

I want to try to create an uneven grid and to do this I need to search for intermediate

 
trader781:

I need order 6 in the grid open, search by ticket

I want to try to create an uneven grid and for that I need to look for intermediate

Sixth - what is "sixth" to you?

Sixth by opening time?

Sixth by price value?

Or sixth by any other trait?

 
Artyom Trishkin:

Sixth - what is "sixth" to you?

Sixth by opening time?

Sixth in price value?

Or sixth by any other attribute?

let me show you in drawings or something....

as an example find these

Files:
nbg.png  8 kb
 
trader781:

let me show you in drawings or something....

find these.

The top one is the sixth one by installation time, the one below in the list in the picture is the tenth. What's the correlation?

In general, sort them by installation time or by ticket in ascending order and choose any one by number from the sorted list.

 
Artyom Trishkin:

The top one is the sixth most installed, the one below in the list in the picture is the tenth. What is the connection?

I do not know how this list should look like a ticket and pull from there the desired result

So we selected via select, then what?

Reason: