I'm developing a multi-instrument strategy in which I would establish long positions of various instruments. At some later point, I'd like to replace a position of instrument A with a new position of instrument B. Here is the code snippet:
ExitLong(0, 100, "EXIT POSITION A", "ENTER POSITION A");
EnterLong(1, 200, "ENTER POSITION B");
With Entries Per Diraction and Entry Handling set to 3 and AllEntries, I found that the EnterLong() order was ignored (see the log below). I suspect it has something to do with the fact that the EnterLong() order was entered, while the ExitLong() order was still working. Is this true? If yes, what's your advise to get this to work. Thanks.
-------------------------- log --------------------------------
2/22/2013 1:00:00 PM Entered internal PlaceOrder() method at 2/22/2013 1:00:00 PM: BarsInProgress=6 Action=Sell OrderType=Market Quantity=42 LimitPrice=0 StopPrice=0 SignalName='myRS1[3] SELL 42 XLE' FromEntrySignal='myRS1[2] BUY 42 XLE'
2/22/2013 1:00:00 PM Entered internal PlaceOrder() method at 2/22/2013 1:00:00 PM: BarsInProgress=9 Action=Buy OrderType=Market Quantity=89 LimitPrice=0 StopPrice=0 SignalName='myRS1[4] BUY 89 XLU' FromEntrySignal=''
2/22/2013 1:00:00 PM Ignored PlaceOrder() method at 2/22/2013 1:00:00 PM: Action=Buy OrderType=Market Quantity=89 LimitPrice=0 StopPrice=0 SignalName='myRS1[4] BUY 89 XLU' FromEntrySignal='' Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties'
OnExecution (6, XLE) on bar[35] order filled Execution='NT-00003' Instrument='XLE' Account='Backtest' Name='myRS1[3] SELL 42 XLE' Exchange=Default Price=78.48 Quantity=42 Market position=Short Commission=0 Order='NT-00003' Time='2/25/2013 1:00:00 PM'
--------------------------- end of log --------------------

Comment