Page 1 of 1

Problem with order enrty

PostPosted: Thu Feb 22, 2018 5:05 pm
by gonzteppenwolf
I'm using the following strategy (attached) and it is supposed to open a new order whenever it closes tha last one. The problem is that I get the following error unsystematically (image attached) and the following order in the opposite direction is not opened. As I mentioned, does not happen all the time.

It reads: "Order failed. Trading activity delayed while Net Quantity order XXXXX is pending".

Any help will be appreciated, thanks !

Re: Problem with order enrty

PostPosted: Thu Mar 01, 2018 6:28 am
by Apprentice
The code is fine. This can happen when the server didn't manage to close all positions in time and received the order for the next trade (exit+entry commands). This can be repeated almost in all strategies which close all opened trades before opening a new one (valuemap.NetQtyFlag = "Y";)

Re: Problem with order enrty

PostPosted: Thu Mar 01, 2018 2:42 pm
by gonzteppenwolf
I changed the code a bit and based it on the code of a different strategy that did not pop-out that error. Got it solved. However, I'm really glad to know the actual origin of the problem. Thanks for the help, this is truly useful. Cheers!