I have watched exactly what is does in the debugger and it looks correct. Today I was trading YG 06-13 with 60 min bars. I had a long position tagged as "L1" and I then do an ExitLong("EL1", "L1"); and then an EnterShort(DefaultQuantity, "S1"); I checked in the debugger and DefaultQuantity is set to 1.
When I do a market replay I see on the chart, "EL1 1 at 1568.3" then, "Close position 1 at 1568.3", then "S1 1 at 1568.3"! When I was running live today it did just this, it actually had 2 positions on at once (2 short), even though the strategy is set to "Set order quantity: default quantity" and "Default quantity: 1". Looking at what shows up on the chart it is probable it is a problem with closing out the long position, because there is only one "S1" listed, one "EL1" and then this strange "Close position 1".
So I checked the documentation and from that I expect "L1" to be my long entry "signal". "EL1" is my exit of long signal, from entry signal "L1". Then my new short entry is entry signal "S1". Here is that TraceOrders:
4/8/2013 11:30:02 AM Entered internal PlaceOrder() method at 4/8/2013 11:30:02 AM: BarsInProgress=0 Action=Sell OrderType=Market Quantity=0 LimitPrice=0 StopPrice=0 SignalName='EL1' FromEntrySignal='L1'
4/8/2013 11:30:02 AM Entered internal PlaceOrder() method at 4/8/2013 11:30:02 AM: BarsInProgress=0 Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='S1' FromEntrySignal=''
Comment