I am trying to write a simple breakout strategy in NinjaTrader. Basically when certain condition is met, I would like to send a buy stop order to IB and the corresponding stop loss and profit target orders are sent out at the same time. However that stop loss and profit target orders only sit on IB's server and are not activated. Only when that buy stop order is executed, the stop loss and profit target orders will be activated. I don't want NinjaTrader to manage the stop loss and profit target orders, otherwise if the network gets disconnected and that buy stop order is executed during this period, it is not protected. Is there any good solution to insure my position is always protected by a stop loss order?
I just found out an old post http://www.ninjatrader.com/support/f...ight=stop+loss. It seems these is no good solution to prevent the risk of a naked position in case of network disconnection unless my strategy monitors the quote tick by tick and when the buy stop order is reached, send out a buy market order and the stoploss and profittarget oco orders at the same time instead of waiting for OnExecution().
- Clearpicks
Comment