Question about trying to read from an array of numbers????

 

Hi all,

I have an array of ticket numbers saved in a file (10 ticket numbers),

What i am trying to do is;

I want to search the array and read the 10 nunbers, then if my current ticket number does NOT match ANY of the 10 ticket mumbers i will then have a

"bool xyz == false;"

Is this possible to scan the full 10 tickets BEFORE deciding that none of them matches my current trade ticket number ???

If so how can i do this??

many thanks.

 
The same way you do an orderselect loop.
 
ubzen:
The same way you do an orderselect loop.

No that does not work. That selects one ticket per time and compares to my open trade ticket mumber. I need to scan all 10 tickets fisrt and comfirm that none are the same as my current ticket number before moving on to the rest of the code?????????
 

Something like below.

for(i=ArraySize-1;i>=0;i--){

   if(Ticket==ArrayValue[i]){

      bool MoveOn=true; 

   } 

}

if( MoveOn ){...Do Something....}
 

Or like this.

for(i=9;i>=0;i--){

   if(Ticket==ArrayValue[i]){

      bool xyz=true;

   } 

}

if( xyz==false ){...Do Something....}
 
ubzen:

Or like this.


I will try that out mate, thanks.