I have a strategy with two bar series, both daily, with stocks loaded into them. The strategy requires measuring relative movement between the two stocks, so I have all my processing in BarsInProgress 1. If I use BIP 0, of course, the data I get from BIP 1 is not up to date yet.
So far so good.
When I take a position, I take it in both stocks at once, like this
(... in BarsInProgress == 1)
EnterLong(1,Inst1Quantity,EntryNameString);
However, only the instrument in BarsInProgress 1 enters the next day. Instrument 0 takes an additional day to enter. Exits are similarly delayed on BIP 0.
This is clearly not what I am after, so perhaps you can advise what might be going wrong.
Here is data from the Output Window using TraceOrders...
23-Feb-93 (BIP==1) Entry: Inst 0 Short 1761 shares, Inst 1 Long 842 shares.
23-Feb-93 12:00:00 AM Entered internal PlaceOrder() method at 23-Feb-93 12:00:00 AM: Action=SellShort OrderType=Market Quantity=1,761 LimitPrice=0 StopPrice=0 SignalName='T1' FromEntrySignal=''
23-Feb-93 12:00:00 AM Entered internal PlaceOrder() method at 23-Feb-93 12:00:00 AM: Action=Buy OrderType=Market Quantity=842 LimitPrice=0 StopPrice=0 SignalName='T1' FromEntrySignal=''
Execution='NT-00000' Instrument='RIOTCT' Account='Sim101' Name='T1' Exchange=Default Price=11.88 Quantity=842 Market position=Long Commission=0 Order='NT-00001' Time='24-Feb-93 12:00:00 AM'
Execution='NT-00001' Instrument='BHPTCT' Account='Sim101' Name='T1' Exchange=Default Price=5.67 Quantity=1,761 Market position=Short Commission=0 Order='NT-00000' Time='25-Feb-93 12:00:00 AM'
As you can see, the TraceOrders of the Entries are the same date, 23-Feb. THE EXECUTIONS ARE DIFFERENT DAYS. This is not a stock data issue as it happens every time on every trade.
Please help.
Cheers,
saltminer

Comment