For repeatedly sending orders until one is executed, the normal way is virtual hedging combined with a tradeUpdate call in a tock function.

void tock() { tradeUpdate(); }