How to select first order?

 

I can select last opened order using

<decompiled code removed>.

But I can't select first Ticket. I have tried more time but failed to do. Give me any suggestion please.
 
saif:

I can select last opened order using

:

 or

:
double ld_12 = 0;
int li_20 = 0;
:
But I can't select first Ticket. I have tried more time but failed to do. Give me any suggestion please.
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. Code like that indicate decompiled code.

    Decompiled code is stolen code. Either you are a thief, a fence, or the receiver of stolen (intellectual) property. Either way we will not be an accomplice after the fact to theft. See also https://www.mql5.com/en/forum/134317

    If you post decompiled code again, you will likely be banned

  3. You couldn't be bothered to learn mql4, therefor there is no common language for us to communicate. If you learned to code you would understand why the first selects the latest order to open and the second select only a sell order with the largest ticket number, and know that neither does what you want.
 
saif:

I can select last opened order using

<decompiled code removed>.

But I can't select first Ticket. I have tried more time but failed to do. Give me any suggestion please.

Are you kidding ? I already told you to not post decompiled code on mql5.com.

Banned 1 month.

Reason: