First, look at the picture from 10:00 am to 11:30 am. According to this strategy, whenever entry0 is closed, entry1 is closed too. This functions perfectly on NT 6.5. Here, however, the ExitLong for entry1 doesn't go through on this backtest (after ExitLong is sent, entry1 is set to null) and everything after this point is corrupt because then when entry1's are attempted to be placed, they get the error that there is already an order with that name, which is true - it's still open.
Entry0 Sent: 9/11/2009 10:00:00 AM Entered internal PlaceOrder() method at 9/11/2009 10:00:00 AM: Action=Buy OrderType=Market Quantity=0.1M LimitPrice=0 StopPrice=0 SignalName='Entry0' FromEntrySignal='' Entry0 Filled: Execution='NT-00130' Instrument='$EURUSD' Account='Backtest' Name='Entry0' Exchange=Default Price=1.46082 Quantity=0.1M Market position=Long Commission=4.13 Order='NT-00140' Time='9/11/2009 10:30:00 AM' Multiplier=1E-05 Order='NT-00140/Backtest' Name='Entry0' State=Filled Instrument='$EURUSD' Action=Buy Limit price=0 Stop price=0 Quantity=0.1M Strategy='BrezJeopardy003' Type=Market Tif=Gtc Oco='' Filled=100000 Fill price=1.46082 Token='2c01f12d1ce74244930ff6e07d3d3e55' Gtd='12/1/2099 12:00:00 AM' Target0 Sent: 9/11/2009 10:00:00 AM Entered internal PlaceOrder() method at 9/11/2009 10:00:00 AM: Action=Sell OrderType=Limit Quantity=0.1M LimitPrice=1.4618'2 StopPrice=0 SignalName='Entry0 - Target' FromEntrySignal='Entry0' Entry1 Sent: 9/11/2009 10:30:00 AM Entered internal PlaceOrder() method at 9/11/2009 10:30:00 AM: Action=Buy OrderType=Market Quantity=0.1M LimitPrice=0 StopPrice=0 SignalName='Entry1' FromEntrySignal='' Entry1 Filled: Time here is 11 AM! Execution='NT-00131' Instrument='$EURUSD' Account='Backtest' Name='Entry1' Exchange=Default Price=1.45882 Quantity=0.1M Market position=Long Commission=4.13 Order='NT-00142' Time='9/11/2009 11:00:00 AM' Multiplier=1E-05 Order='NT-00142/Backtest' Name='Entry1' State=Filled Instrument='$EURUSD' Action=Buy Limit price=0 Stop price=0 Quantity=0.1M Strategy='BrezJeopardy003' Type=Market Tif=Gtc Oco='' Filled=100000 Fill price=1.45882 Token='17a7ab6f1ed1418db7c3b534ec3217a2' Gtd='12/1/2099 12:00:00 AM' Target0 Filled: Execution='NT-00132' Instrument='$EURUSD' Account='Backtest' Name='Entry0 - Target' Exchange=Default Price=1.46182 Quantity=0.1M Market position=Short Commission=4.13 Order='NT-00141' Time='9/11/2009 11:00:00 AM' Multiplier=1E-05 Order='NT-00141/Backtest' Name='Entry0 - Target' State=Filled Instrument='$EURUSD' Action=Sell Limit price=1.46182 Stop price=0 Quantity=0.1M Strategy='BrezJeopardy003' Type=Limit Tif=Gtc Oco='' Filled=100000 Fill price=1.46182 Token='ecc748a6a1f54b6a9deaeb8643a9336b' Gtd='12/1/2099 12:00:00 AM' Entry1 Sent to Close: at 10:30... 9/11/2009 10:30:00 AM Entered internal PlaceOrder() method at 9/11/2009 10:30:00 AM: Action=Sell OrderType=Market Quantity=0.1M LimitPrice=0 StopPrice=0 SignalName='Target Hit1' FromEntrySignal='Entry1'
I think the problem here has to do with the internal timing logic. Its cancel order was sent on the 11 am bar when it was filled, from getting an entry signal at 10:30. Again, on NT 6.5 this did not malfunction. Changing the bar sizes to 10 minutes spread things out and also avoided the problem, but I'd like the error fixed so I can use whichever bar time is best.
Also, I tried running this strategy with multicoreenabled to false and setting the IOrders to volatile. This didn't do anything to change the results.
- Daniel

Comment