Ensuring an order is executed
1 replies
beniko
8 years ago #113523
Hello Mark,
While creating and testing some EAs I noticed that some times orders are not placed because of some error maybe server-client issues etc. This can be a problem when the conditions to place the order no longer apply, especially when closing a position since it will be kept open and then it wont be closed at all until manual intervention.
How could somebody create a loop of placing a particular order until it will be fulfilled? Do you have any other suggestions?
Regards,
Benjamin
Mark Fric
8 years ago #129541
Hello Benjamin,
there already is a loop, EA tries to open the position 3 times, but if the server issue takes too long it will be not able to place the order even in this case.
You can see how it is done in sqOpenOrder() function and see the loop there.
Mark
StrategyQuant architect
Viewing 1 replies (of 1 total)