1. Am I correct in thinking that when a stoploss is attached to a limit order through Ninja Script, the limit order would be sent to IB's server (via TWS) to await execution but the stoploss order would not be sent to the IB server until Ninja Trader received a signal confirming execution of the limit order?
If this is the case then it is a concern as there is the possibility, however slight, of my connection going down leaving my limit order able to execute with no stoploss in place. TWS and its API allow for the stoploss order or a bracket order (OCO stoploss and take profit) to be attached to the limit so that they wait on the IB server together, reducing the risk of any connection errors or delay in activating the stop orders. Is this possible to achieve through Ninja Script?
2. If the stoploss is only sent after the original limit order has executed, is there any advantage to attaching it as a stoploss or would a stand alone stop order be just as effective? The only advantage I can see is that the stoploss is automatically cancelled if I cancel the limit order but it would be pretty simple just to cancel them both.
An advantage of placing the stoploss as stand alone order would be that I could set the order size to a different quantity than the original entry order. Therefore I would be able to enter the trade with a single order and scale out with multiple exit orders. Is this correct?
3. Is it possible to use Ninja Script to create OCO groups to exit trades without them being linked to an entry order? For example, enter a trade with a buy limit order and once the strategy receives confirmation of execution, to place one stop order to act as a stoploss and a limit to act as a profit taker, with whichever of these secondary orders that executes first cancelling the other. I haven't come across a way of creating OCO groups in Ninja Script, any pointers would be great.
Many thanks,
Fred.

Comment