This I did according to my log as follows:
2/28/2008 0:29 Connection Primary connection=Disconnected Price feed=Disconnected
2/28/2008 0:28 Position Flatten account='Sim101'
2/28/2008 0:28 Position Flatten account='LiveAccount'
2/28/2008 0:28 Strategy Terminating any NinjaScript strategies invoked by Flatten Everything command
2/28/2008 0:28 Position Flatten account='Sim101'
2/28/2008 0:28 Strategy Terminating any NinjaScript strategies invoked by Flatten Everything command
2/28/2008 0:28 Order Cancel all orders account='Sim101'
2/28/2008 0:28 Position Flatten account='Sim101'
2/28/2008 0:28 Strategy Terminating any NinjaScript strategies invoked by Flatten Everything command
You'll see I flattened my accounts & cancelled all orders. I then closed my connection.
My log tells a similar story:
YM 03-08 Buy Market 1 0 0 Filled 1 12611 0 Close Day Sim101 2/28/2008 23:02 + - X
YM 03-08 Buy Market 1 0 0 Filled 1 12672 0 Close Day Sim101 2/28/2008 0:24 + - X
YM 03-08 Sell Market 1 0 0 Filled 1 12663 0 Day Sim101 2/28/2008 0:23 + - X
YM 03-08 Sell StopLimit 1 12637 12657 Cancelled 0 0 1 Stop1 Day Sim101 2/28/2008 0:00 + - X
The times show no trading activity between 0.24 am and 11.02 pm the next day.
Accounts were flattened at 0.28 after the last trade.
When I closed my connection, no positions were open.
When I opened it the next day - there was an open demo trade right there in front of me.
My guess is maybe I executed a StopLimit order somewhere the previous day I didn't account for - but once again I just have no idea about this.
My understanding is that "Flatten Account" and "Cancel All Orders" BOTH cancel ALL orders of ALL types. Is this somehow incorrect?
How can this order have occurred, and how can I perform the simple operation of closing NinjaTrader and closing all orders, everything - period - so I don't wake up to more surprises like this? If every time I close NinjaTrader I Flatten all accounts and Cancel All Orders multiple times, and then I see open orders with no stop loss 24 hours later, I'm effectively wondering 24/7 when the next unexpected trade will occur.
Again, I readily agree this is my human error. What I want to do is stop the program from trading when I'm not there. What can I do?
Thanks for understanding,
Jeremy
Comment