I try to achieve an intrabar fill for my strategy by adding a daily BarsObject to a weekly chart. (I use Yahoo for data feed). It works well for entries if you use market orders, i.e. "EnterLong(int barsInProgressIndex, int quantity, string signalName)".
But if I use a limit order, i.e.
"EnterLongLimit(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double limitPrice, string signalName) "
it seams as if I have to set the liveUntilCancelled parameter to True, to make it work. Otherwise the Weekly bar series (BarsInProgress =0) cancells the orders that are submitted to the daily bar series. Is this expected?
My seccond question is, how can I achieve an intrabar fill for the exit method SetStopLoss() ?
My trace file:
2010-01-08 15:34:11 CancelAllOrders: BarsInProgress=0 2008-01-31 00:00:00 Entered internal PlaceOrder() method at 2008-01-31 00:00:00: Action=SellShort OrderType=Limit Quantity=1 LimitPrice=36,98 StopPrice=0 SignalName='Short 1a' FromEntrySignal='' 2008-02-01 00:00:00 Cancelled expired order: BarsInProgress=0: Order='NT-00000/Sim101' Name='Short 1a' State=Working Instrument='A' Action=SellShort Limit price=36,977697345507 Stop price=0 Quantity=1 Strategy='TestingIntrabarBacktest' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='b7dcd4f2d0944a58a338ad130f78302f' Gtd='2099-12-01 00:00:00' 2008-06-26 00:00:00 Entered internal PlaceOrder() method at 2008-06-26 00:00:00: Action=Buy OrderType=Limit Quantity=1 LimitPrice=33,37 StopPrice=0 SignalName='Long 1a' FromEntrySignal='' 2008-06-27 00:00:00 Cancelled expired order: BarsInProgress=0: Order='NT-00001/Sim101' Name='Long 1a' State=Working Instrument='A' Action=Buy Limit price=33,3674306480076 Stop price=0 Quantity=1 Strategy='TestingIntrabarBacktest' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='ba1b2c1ecc4b45aea67e813f81d55266' Gtd='2099-12-01 00:00:00' 2008-09-18 00:00:00 Entered internal PlaceOrder() method at 2008-09-18 00:00:00: Action=SellShort OrderType=Limit Quantity=1 LimitPrice=35,46 StopPrice=0 SignalName='Short 1a' FromEntrySignal='' 2008-09-19 00:00:00 Cancelled expired order: BarsInProgress=0: Order='NT-00002/Sim101' Name='Short 1a' State=Working Instrument='A' Action=SellShort Limit price=35,4570762732273 Stop price=0 Quantity=1 Strategy='TestingIntrabarBacktest' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='68f885381e2c46298dda28b968d40e7e' Gtd='2099-12-01 00:00:00' 2009-09-10 00:00:00 Entered internal PlaceOrder() method at 2009-09-10 00:00:00: Action=Buy OrderType=Limit Quantity=1 LimitPrice=21,40 StopPrice=0 SignalName='Long 1a' FromEntrySignal='' 2009-09-11 00:00:00 Cancelled expired order: BarsInProgress=0: Order='NT-00003/Sim101' Name='Long 1a' State=Working Instrument='A' Action=Buy Limit price=21,4026151299527 Stop price=0 Quantity=1 Strategy='TestingIntrabarBacktest' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='dc2b742608b04bf098a59da560e6a95f' Gtd='2099-12-01 00:00:00'

What code is missing in the strategy that I posted below?
Comment