I'm having an issue with the SubmitOrder() and Exit on Close
While backtesting my strategy I noticed the first few days worked fine, but by the end of the strategy an exit was acting as an entry and throwing everything else off. I tracked it down to 8/9 when there was a Exit on Close called by NT that exited one of my positions. I trade with two contracts 1 for short gains and 1 for long gains. In this example the 2 longs were filled at 14:53:34. At 15:32:46 the Quick exited. The Runner entry shows to have exited at 18:06:59, but in fact there was an Exit on Close at 16:00:00 that exited the Runner entry. So the Exit at 18:06:59 turned into an entry and everything was messed up from that point forward.
8/09 14:53:34 -- ID: NT-00588, BullQuickIII Enter, Action: Buy, AvgFillPrice: 691.8 8/09 14:53:34 -- ID: NT-00589, BullRunnerIII Enter, Action: Buy, AvgFillPrice: 691.8 8/09 15:32:46 -- ID: NT-00588, BullQuickIII Exit (RMI), Action: Buy, AvgFillPrice: 691.9 8/09 15:32:46 -- ID: NT-00590, BullQuickIII Exit (RMI) Order, Action: SellShort, AvgFillPrice: 697.7 8/09 18:06:59 -- ID: NT-00589, BullRunnerIII Exit (VMAZones), Action: Buy, AvgFillPrice: 691.9 8/09 18:06:59 -- ID: NT-00592, BullRunnerII Exit (VMAZones) Order, Action: SellShort, AvgFillPrice: 693.5 8/09 18:49:19 -- ID: NT-00593, BullQuickIII Enter, Action: Buy, AvgFillPrice: 693 8/09 18:49:19 -- ID: NT-00594, BullRunnerIII Enter, Action: Buy, AvgFillPrice: 693
Thanks

Comment