I have a strat that works with multiple instruments. If a limit is crossed i'll but spy's and if another limit is crossed I'll sell the ES. Profit targets and Stop losses are then set for each. What's happening is the Spy's enter and set their profit target and stop loss. On the next bar update the ES is triggered and set's it's profit target and stop loss, but then within the same bar the ES order is immediately canceled/Exited as are the stops. I'm attaching the output as well as the trade ledger. Any help would be much appreciated.
6/15/2010 8:39:00 AM Entered internal PlaceOrder() method at 6/15/2010 8:39:00 AM: BarsInProgress=0 Action=Buy OrderType=Limit Quantity=1,000 LimitPrice=110.44 StopPrice=0 SignalName='Buy Breakout Bias 1' FromEntrySignal=''
6/15/2010 8:39:00 AM Entered internal SetStopTarget() method: Type=Target FromEntrySignal='' Mode=Ticks Value=65.9999999999981 Currency=0 Simulated=False
6/15/2010 8:39:00 AM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Ticks Value=44.9999999999987 Currency=0 Simulated=False
Time 83900
Date 20100615
High 110.41
Low 110.2
Range 0.209999999999994
Profit Target 65.9999999999981
Stop Loss 44.9999999999987
Profit Target2 21.9999999999994
Stop Loss2 14.9999999999996
Entry Point 110.41
6/15/2010 8:40:00 AM Entered internal PlaceOrder() method at 6/15/2010 8:40:00 AM: BarsInProgress=1 Action=SellShort OrderType=Limit Quantity=2 LimitPrice=1098.00 StopPrice=0 SignalName='Sell Reversal Bias 1' FromEntrySignal=''
6/15/2010 8:40:00 AM Entered internal SetStopTarget() method: Type=Target FromEntrySignal='Sell Reversal Bias 1' Mode=Ticks Value=21.9999999999994 Currency=0 Simulated=False
6/15/2010 8:40:00 AM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='Sell Reversal Bias 1' Mode=Ticks Value=14.9999999999996 Currency=0 Simulated=False
Time 84000
Date 20100615
High 110.41
Low 110.2
Range 0.209999999999994
Profit Target 65.9999999999981
Stop Loss 44.9999999999987
Profit Target2 21.9999999999994
Stop Loss2 14.9999999999996
Entry Point 110.41
6/15/2010 8:40:00 AM Cancelled pending exit order, since associated position is closed: Order='NT-00011/Backtest' Name='Profit target' State=Working Instrument='ES 06-10' Action=BuyToCover Limit price=1097.75 Stop price=0 Quantity=2 Strategy='MarketBiasBASE_Long_Short' Type=Limit Tif=Gtc Oco='NT-00005' Filled=0 Fill price=0 Token='b919262576464d62ae90d680d9cdcc02' Gtd='12/1/2099 12:00:00 AM'
6/15/2010 8:40:00 AM Cancelled OCO paired order: BarsInProgress=1: Order='NT-00011/Backtest' Name='Profit target' State=Cancelled Instrument='ES 06-10' Action=BuyToCover Limit price=1097.75 Stop price=0 Quantity=2 Strategy='MarketBiasBASE_Long_Short' Type=Limit Tif=Gtc Oco='NT-00005' Filled=0 Fill price=0 Token='b919262576464d62ae90d680d9cdcc02' Gtd='12/1/2099 12:00:00 AM'
Ledger for both trades: The spy trade shows it exited based on it's profit target but the ES was immediately exited stating a Stop loss" but we can see from the output the stop loss was 14.9 ticks. I have live until canceled set to true.
3 ES 06-10 Backtest MarketBiasBASE_Long_Short Short 2 1098 1098.25 6/15/2010 8:41:00 AM 6/15/2010 8:41:00 AM Sell Reversal Bias 1 Stop loss 1
4 SPY Backtest MarketBiasBASE_Long_Short Long 1000 110.44 111.1 6/15/2010 8:40:00 AM 6/15/2010 12:16:00 PM Buy Breakout Bias 1 Profit target 647.999999999997 1978.99999999999 12 230.000000000004 659.999999999997 12 217
thanks

Comment