OrderSelect selects wrong order

 

Hi, has anyone come across this problem before? My OrderSelect function does not select the order with the index that is the first argument of the function. For example, the code below correctly shows there are 20 orders but shows the OrderTicket of the 7th order. GetLastError returns 0. The problem occurred a couple of weeks ago and I solved it by reformatting my computer. It worked fine for a couple of weeks but now it's doing it again. Every other programme works fine and there are no known viruses or malware.

 OrderSelect (0,SELECT_BY_POS);
 Alert (OrdersTotal(), "  ", OrderTicket());  
 Alert (GetLastError());  
 
Here.
 
MikeTubbs:

Hi, has anyone come across this problem before? My OrderSelect function does not select the order with the index that is the first argument of the function. For example, the code below correctly shows there are 20 orders but shows the OrderTicket of the 7th order. GetLastError returns 0. The problem occurred a couple of weeks ago and I solved it by reformatting my computer. It worked fine for a couple of weeks but now it's doing it again. Every other programme works fine and there are no known viruses or malware.

Rather than spending the time to rebuild you OS you should spend the time reading about the functions you are trying to use.  That would be time well spent not wasted . . .  OrderSelect()
Reason: