PDA

View Full Version : OCO and cancelling order questions


kjackson
11-28-2009, 01:03 PM
If I enter a long position with a particular signal name, and then I call both ExitLongStop and ExitLongLimit using the same signal name, if either the limit or the stop is hit, will the other always get automatically cancelled, ie. will this be an OCO order? In running the simulations that seems to be the case but I just want to verify that it the case always.

Also, in running the simulation, I find that my code might possibly cancel a current EnterLongStop and then switch to EnterShortStop. This seems to work okay, but when I cancel an order and then create a new order, should I use a different signal name, or is using the same signal name of an order I cancelled okay?

Thanks in advance,

Ken

NinjaTrader_Austin
11-29-2009, 04:09 PM
Will this be an OCO order?
kjackson, yes it will be.

Should I use a different signal name, or is using the same signal name of an order I cancelled okay?

It is possible to use the same signal name but it is recommended to use different names for long and short entries.

kjackson
11-29-2009, 05:21 PM
Thanks for your answers, Austin.

Just to expand on my second question, is it recommended that every time an order is cancelled and a new order it placed, that a new signal name should be generated for the new order? For example, if I place an EnterLongStop order, and then cancel it, and then place a new EnterLongStop order, should I use a new signal name again?

Generating new signal names isn't a problem (I'm assuming that just adding a count to the signal name is fine, ie. Trade1, Trade2, Trade, etc). I'm just trying to understand what the rules are with signal names on orders that have been placed but not filled yet.

Thanks in advance,

Ken

NinjaTrader_Josh
11-30-2009, 07:12 AM
Ken,

You do not have to generate a new name, but if you want to differentiate the two, you should do so.

kjackson
12-01-2009, 01:22 AM
great, thanks Josh!