Rarely my strategy gives signals on two adjacent bars. My entries are with the default liveUntilCancelled (false), but my trace orders yields this:
1/4/2009 7:35:00 PM Entered internal PlaceOrder() method at 1/4/2009 7:35:00 PM: Action=SellShort OrderType=Limit Quantity=0.02M LimitPrice=1.3924 StopPrice=0 SignalName='ShortX' FromEntrySignal=''
1/4/2009 7:36:00 PM Entered internal PlaceOrder() method at 1/4/2009 7:36:00 PM: Action=SellShort OrderType=Limit Quantity=0.02M LimitPrice=1.3922 StopPrice=0 SignalName='ShortX' FromEntrySignal=''
1/4/2009 7:36:00 PM Amended open order: Action=SellShort OrderType=Limit Quantity=20000 LimitPrice=1.3922 StopPrice=0 SignalName=ShortX' FromEntrySignal=''
1
i.e., my strategy is sending two orders. I trap for MarketPosition.Position == (long or short) to prevent this, but when I get two signals on adjacent bars, the first order isn't automatically cancelled yet by NT, and when it's not filled, I get a second order because there is no position. Is there anyway to prevent the second order or to cancel the first? I'd like to know how to do both because theoretically, the first would be a better price most of the time.
Please advise, thanks.
Comment