PDA

View Full Version : Stop order not visible in TWS


billitin
06-25-2008, 07:54 AM
Hi, I've got an automated strategy running and thanks to all the support I've found here it's doing fine. There's one thing I'm concerned about though. When I place a bracket order it does get filled on either side, however in TWS (I'm with IB) I can see only the limit order placed. It's kinda scary if it means that should Internet/TWS/NT freeze the proposed stop won't be executed by the brokerage. Maybe I missed something in configuration?

Thanks in advance.

NinjaTrader_Ray
06-25-2008, 08:33 AM
How are you placing a bracket order?

billitin
06-25-2008, 09:07 AM
Here's the script sample:

protected override void Initialize() {
CalculateOnBarClose = true;
}

protected override void OnBarUpdate() {
....
EnterShort( amount, 'sell' );
SetProfitTarget ( 'sell', CalculationMode.Ticks, 20 );
SetStopLoss ( 'sell', CalculationMode.Ticks, 60, true );
}

NinjaTrader_Ray
06-25-2008, 09:12 AM
Do this:

EnterShort( amount, 'sell' );
SetProfitTarget ( 'sell', CalculationMode.Ticks, 20 );
SetStopLoss ( 'sell', CalculationMode.Ticks, 60, false);

billitin
06-25-2008, 09:47 AM
hmm but then how do I attach a stop-limit order to my order?

NinjaTrader_Ray
06-25-2008, 11:36 AM
You can try ExitLongStopLimit()

billitin
06-25-2008, 02:05 PM
sure, thanks!