Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 Behaviour with Connection reset

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NT8 Behaviour with Connection reset

    I had a very bad experience with NT8 today and would like to know why this happened and how to prevent such issues. Now here is the issue description and the NT8 logs. The issue happened on live trading.

    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

    #2
    Hello ajsdnyyrr1234DDf,
    Thanks for your post.

    Its possible this is happening because Connection Loss Handling is set to "Recalculate" in the platform options window. You can find this setting in your Control Center>Tools>Options>Strategies>On Connection loss .
    When the platform reconnects to data it is reevaluating those positions which can cause the cancellations. What settings are you using in the platform options window under the "NinjaScript" and "On connection loss" categories? You may take a screenshot if you like.

    To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.
    Click here for instructions

    Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
    Click here for detailed instruction

    I look forward to your reply.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      See attached the screen shot
      Attached Files

      Comment


        #4
        Hello ajsdnyyrr1234DDf,
        Thanks for your note.

        If you would like the strategy to continue running without the possibility of your orders being recalculated and changing on re-connection than you should set the Connection loss handling setting to "Keep running".

        ConnectionLossHandling
        https://ninjatrader.com/support/help...sshandling.htm

        Please let me know if you have any further questions.
        Josh G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by MarianApalaghiei, Today, 10:49 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        45 views
        0 likes
        Last Post bill2023  
        Working...
        X