I had a position open by the running strategy. When I check my screen after a while, I could see the position was still open but NT8 has already cancelled out my stop loss and take profit orders. From the logs, I could see there was a connection disconnect and reestablishment. Right after the connection was reestablished, NT8 went ahead and issued a Cancel all orders leaving my position open. So my open position was left unprotected and the stop loss orders were cancelled. I don't know why
Why would NT8 doing a cancel order upon connection reestablishment leaving open position vulnerable to losses.
I am using Start behavior Adopt Account position
See below my logs.
Order Submitted 9:30
Connection Lost 14:12
After Connection reestablishment - StopLoss() and TakeProfit() was cancelled automatically leaving open position vulnerable to losses.
3/14/18 14:13 Order Order='419192378/myLiveAcct' Name='Stop loss' New state='Cancelled' Instrument='EURUSD' Action='Sell' Limit price=0 Stop price=1.23205 Quantity=4,000 Type='Stop Market' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 14:13 Order Order='419192381/myLiveAcct' Name='Profit target' New state='Cancelled' Instrument='EURUSD' Action='Sell' Limit price=1.25305 Stop price=0 Quantity=4,000 Type='Limit' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 14:13 Default Enabling NinjaScript strategy 'Ninja8HAAEU/131610929' : On starting a real-time strategy - StartBehavior=AdoptAccountPosition AccountPosition=EURUSD 4000L, EURUSD 4000L EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=False SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Order Order='419192378/myLiveAcct' Name='Stop loss' New state='Cancel submitted' Instrument='EURUSD' Action='Sell' Limit price=0 Stop price=1.23205 Quantity=4,000 Type='Stop Market' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 14:13 Order Order='419192381/myLiveAcct' Name='Profit target' New state='Cancel submitted' Instrument='EURUSD' Action='Sell' Limit price=1.25305 Stop price=0 Quantity=4,000 Type='Limit' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Default Cancel all orders account='myLiveAcct'
3/14/18 14:13 Connection Connection restored to the NinjaTrader Historical Data Server: hds-us-001.ninjatrader.com
3/14/18 14:13 Connection My FOREX.com (Beta): Primary connection=Connected, Price feed=Connected
3/14/18 14:12 Default Disabling NinjaScript strategy 'Ninja8HAAEU/131610929'
3/14/18 14:12 Default Strategy 'Ninja8HAAEU/131610929' lost price connection for more than 10 seconds and will be restarted.
3/14/18 14:12 Connection Using HDS (hds-us-001.ninjatrader.com/31655)
3/14/18 14:12 Connection My FOREX.com (Beta): Primary connection=Connection lost, Price feed=Connection lost
3/14/18 14:12 Connection Connection lost to the NinjaTrader Historical Data Server: hds-us-001.ninjatrader.com
3/14/18 9:30 Order Order='419192381/myLiveAcct' Name='Profit target' New state='Working' Instrument='EURUSD' Action='Sell' Limit price=1.25305 Stop price=0 Quantity=4,000 Type='Limit' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 9:30 Order Order='419192381/myLiveAcct' Name='Profit target' New state='Accepted' Instrument='EURUSD' Action='Sell' Limit price=1.25305 Stop price=0 Quantity=4,000 Type='Limit' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 9:30 Order Order='419192378/myLiveAcct' Name='Stop loss' New state='Working' Instrument='EURUSD' Action='Sell' Limit price=0 Stop price=1.23205 Quantity=4,000 Type='Stop Market' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 9:30 Order Order='419192378/myLiveAcct' Name='Stop loss' New state='Accepted' Instrument='EURUSD' Action='Sell' Limit price=0 Stop price=1.23205 Quantity=4,000 Type='Stop Market' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 9:30 Position Instrument='EURUSD' Account='myLiveAcct' Average price=1.23705 Quantity=4,000 Market position=Long Operation=Operation_Add
3/14/18 9:30 Order Order='b4fe5d0e01e048138c4fd453828be073/myLiveAcct' Name='Profit target' New state='Submitted' Instrument='EURUSD' Action='Sell' Limit price=1.25305 Stop price=0 Quantity=4,000 Type='Limit' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 9:30 Order Order='fb794708341d45e6aa0c313eaf1b5263/myLiveAcct' Name='Stop loss' New state='Submitted' Instrument='EURUSD' Action='Sell' Limit price=0 Stop price=1.23205 Quantity=4,000 Type='Stop Market' Time in force=GTC Oco='17810146' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 9:30 NinjaScript NinjaScript strategy 'Ninja8HAAEU/131610929' submitting order
3/14/18 9:30 NinjaScript NinjaScript strategy 'Ninja8HAAEU/131610929' submitting order
3/14/18 9:30 Execution Execution='17810146' Instrument='EURUSD' Account='myLiveAcct' Exchange=Default Price=1.23705 Quantity=4,000 Market position=Long Operation=Operation_Add Order='419192375' Time='3/14/2018 09:30'
3/14/18 9:30 Order Order='419192375/myLiveAcct' Name='LongHAAEU' New state='Filled' Instrument='EURUSD' Action='Buy' Limit price=0 Stop price=0 Quantity=4,000 Type='Market' Time in force=GTC Oco='' Filled=4000 Fill price=1.23705 Error='No error' Native error=''
3/14/18 9:30 Order Order='db82e3b6b1324f938644fd912f95be91/myLiveAcct' Name='LongHAAEU' New state='Submitted' Instrument='EURUSD' Action='Buy' Limit price=0 Stop price=0 Quantity=4,000 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
3/14/18 9:30 NinjaScript NinjaScript strategy 'Ninja8HAAEU/131610929' submitting order
3/13/18 9:56 Default Enabling NinjaScript strategy 'Ninja8HAAEU/131610929' : On starting a real-time strategy - StartBehavior=AdoptAccountPosition AccountPosition=EURUSD 4000L, EURUSD 4000L EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=False SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes
Comment