Whats the best way to ensure that your order was filled.
Right now I'm doing somet hing like
int Ticket = 0;
int Counter = 0;
while(ticket < 1)
{
Ticket = OrderSend(.....);
/*Break the loop if it still fails after 20 tried.*/
if(Counter++ > 20)
Break;
/*If it failed, sleep for 1 second*/
if(Ticket < 1)
Sleep(1000);
}
Is there a better way to make sure it gets filled at the current price?
Right now I'm doing somet hing like
int Ticket = 0;
int Counter = 0;
while(ticket < 1)
{
Ticket = OrderSend(.....);
/*Break the loop if it still fails after 20 tried.*/
if(Counter++ > 20)
Break;
/*If it failed, sleep for 1 second*/
if(Ticket < 1)
Sleep(1000);
}
Is there a better way to make sure it gets filled at the current price?