Orders that are open and closed

While experimenting with a test system I noticed that C2 will not send ‘Sell To Close’ orders to clients until they confirm they have opened that position to begin with - This is what the manual claims as well, and it’s fair.



Problem is… I found that behavior not be quite exact in practice, this is what I observe:



Test system issues BTO 100 SYMBOL MARKET @ 9.00am - client is offline (not receiving/processing signals)

Test system closes order, hence issues STC 100 SYMBOL MARKET @ 9.05am - client is offline (not receiving/processing signals yet)

Client comes online @ 9.10

Client receives invalid BTO signal @ 9.10

Client acks & reports filled info back to C2 @ 9.11

Client receives STC signal @ 9.12

Client acks & reports filled info back to C2 @ 9.13



So my question is… why was the client forced to open a position that C2 knew closed already ? I understand the client will get a signal ‘delayed’ if it wasn’t listening, but (IMHO) this should not be the case if that position has been closed, or the order was cancelled.



cheers

Hi, Angelo:



Yes, you did find an odd (and theoretically rare) edge condition.



Here’s the way it works:



If your AutoTrade software client misses a signal (i.e. is offline when the signal is generated) – we’ll resend the signal when your software client comes back online and reconnects to the server if it’s a pending limit or stop order that hasn’t yet filled. If it’s a market order, we’ll resend the missed opening signal for a 10-minute period. Then we’ll stop trying to send it. (The idea is: you probably don’t want to trade a market order that’s more than 10 minutes old.)



And of course we won’t send you a closing signal unless you acknowledge receiving and filling the matching opening order.



Given all that, in this case you were “unlucky.” You connected to the server at the very end of the ten-minute okay-to-send-old-market-orders window, then got the opening signal, then immediately got the closing signal.



Why? Because I must admit that in this case of a “missed” signal, C2 does not necessarily check to see if the opening market order we are sending you is already closed. Obviously we’ll need to look into fixing that.



But, by way of comfort, this is pretty rare. The following circumstances would have to be met for it to occur: a) You are offline when the initial opening signal is generated. b) You come online within 10 minutes. c) The system closes the position within that 10-minute window.



Again, we’ll look into trying to eliminate this condition. Thanks for reporting.