OrderSelect from History

 

Alright does not make sense.

The following code triggers as if the order was closed and it is not, still a buy:

Statement same as I have always used, except for variable name. Went back and looked at some old programs that used it.

if( (AccountNumber() == MasterAct[index]) && (OrderSelect(MasterTickets[index], SELECT_BY_TICKET, MODE_HISTORY) == true) )

if( OrderSelect(MasterTickets[index], SELECT_BY_TICKET, MODE_HISTORY) == true )
   Print( "Found in history: ", MasterTickets[index] );
 
EnigmaTrader:

Alright does not make sense.

The following code triggers as if the order was closed and it is not, still a buy:

Statement same as I have always used, except for variable name. Went back and looked at some old programs that used it.

You haven't checked if the order was closed or not . . .  all you have done is selected an order using it's ticket number.  Don't assume,  read the documentation . . . OrderSelect()  "The pool parameter is ignored if the order is selected by the ticket number."
 

Oh sheesh.

I did read it and it just did not register.have used order select before. Having to check for close time completely slipped my mind.

As it turns out that is the way 'close time' that I have been actually using before.

Thank you.