Yeah cmon I am not bright but not that How do you contol risk of order been not cancelled in time.. Say your algo decided the order is not needed anymore and CME had 20ms delay at the time plus your other expenses (quoted above as 100ms)? Could be a tricky task... P.S. no that question is more applicable if you have stop orders for entry... perhaps... limits for exit should be safe (why to cancel!). Do you use stop orders for entry at all (to cut down the slippage) ?
I would assume that the simulated trailing stops would be implemented with stop orders resting on the CME servers, but not visible in the books until the trigger is hit. Otherwise, monitoring trading and then firing off a market order at the stop level would be too risky. Only problem with continually modifying the stop level is that on each modification, the stop is pulled out of the order queue and re-entered at the very back of the next level. Either way, there's no way to avoid slippage. CME's requirement of FIFO order processing is probably the reason why they don't support trailing stops. Not sure how trailing stops are implemented in other markets.
Nothing Tricky just process your order operations in sequence. Issue CXL Confirm CXL Issue New Order Confirm New Order and record your fills. OCO's work well too. We use limits and stops but we don't play the high frequency order shaking game. Our transactions are trade sets consisting of a sequence of trades.
OK.. lets rephrase. If you wanted to do following how would you go about it: you know that there are delays in the chain of events: Last printed, submitted to you, processed on your server, algo made decision, order submitted, CME placed the order... During this delay price might went away couple of ticks already... So if you use Market order you lost those ticks... Say you have piece of code which say - we are about to trigger some algo rules and if it happen we want to enter at price X. you want to save those ticks and place stop order in anticipated direction keeping finger tight on Cancel button if those rules are not hit after all and the order is now your enemy as it might get you into unwanted trade.... Hmm.. While writing I realised that that makes sense only for an algorithm based exclusively on price action...
You want to play the order shake game intra second, constantly canceling and placing new limit orders based on price action. Option 1: Colocate and manage the order process cradle to grave.. Option 2: Use broker advanced order types. Trailing Stops, OCO's, Brackets etc. and have our orders sit on their servers. Option 3: CME iLink or what ever the name of their market maker software that allows you to manage mass quotes may also do the trick. Also note there is no such thing as a pure market order with CME. CME converts all Market orders to limit orders at the current best price to fill. They call them Market with Protection orders and they have priority over all of the queued orders.
There is a good list exchanges and the order types they support here: http://www.interactivebrokers.com/en/p.php?f=exchanges Click on the individual exchange and then order types. The list of order types natively supported by the exchange is shown as well as the "simulated" order types implemented by the broker (in this case IB). As remarked above, utilizing the broker implemented order types where possible is a very good idea.
BTW - order shake game - is it a known strategy or you just imporvised? I mean I am not going to do it (I even dont know what is it).. Just curious what over people could manage to achieve...