Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninjatrader crashes and terminates after getting stuck in some sort of order loop

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

    Ninjatrader crashes and terminates after getting stuck in some sort of order loop

    Hi,

    Have you any idea or suggestions as to what is going on here?

    I have a strategy that submits an ATM order during playback. I am testing in playback. An order gets submitted and executed, but NT8 then freezes and quits with no error.

    This is the trace log before the termination. Seems to be stuck in some sort of order loop. Do you know what might be the cause?


    2023-10-06 18:32:56:002 (Playback Connection) Cbi.Account.AccountItemUpdateCallback: account='Playback101' accountItem=WeeklyProfitLoss currency=UsDollar value=*****
    2023-10-06 18:32:56:002 (Playback Connection) Cbi.Account.ResetSimulationAccount.End: account='Playback101'
    2023-10-06 18:33:02:356 Cbi.Instrument.RequestBars (to Provider): instrument='@NAS100' from='Sunday, 06, 02, 2022 00:00:00' to='Friday, 29, 09, 2023 00:00:00' period='1 Minute'
    2023-10-06 18:33:02:718 Cbi.Instrument.RequestBars (to Provider): instrument='@NAS100' from='Sunday, 04, 12, 2022 00:00:00' to='Friday, 29, 09, 2023 00:00:00' period='1 Minute'
    2023-10-06 18:36:57:039 ActiproManager.LoadIntellipromptAssemblies (BrightWire.Net4): Could not load file or assembly 'protobuf-net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67' or one of its dependencies. The system cannot find the file specified.
    2023-10-06 18:37:22:673 (Playback Connection) Cbi.Account.CreateOrder: orderId='1463dbcb6c574f2f88d33c177867fdb0' account='Playback101' name='Entry' orderState=Initialized instrument='@NAS100' orderAction=Sell orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Day oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=38408 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29' id=-1 comment=''
    2023-10-06 18:37:22:757 (Playback Connection) Cbi.Account.Submit0: realOrderState=Initialized isPendingSubmit=False orderId='1463dbcb6c574f2f88d33c177867fdb0' account='Playback101' name='Entry' orderState=Initialized instrument='@NAS100' orderAction=Sell orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Day oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=38408 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29'
    2023-10-06 18:37:22:768 (Playback Connection) Cbi.Account.Submit1: realOrderState=Initialized orderId='1463dbcb6c574f2f88d33c177867fdb0' account='Playback101' name='Entry' orderState=Initialized instrument='@NAS100' orderAction=Sell orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Day oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=38408 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29'
    2023-10-06 18:37:22:770 (Playback Connection) Cbi.Simulator.Submit: realOrderState=Initialized orderId='1463dbcb6c574f2f88d33c177867fdb0' account='Playback101' name='Entry' orderState=Initialized instrument='@NAS100' orderAction=Sell orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Day oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=38408 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29' delay=0
    2023-10-06 18:37:22:784 (Playback Connection) Cbi.Account.OrderUpdateCallback: realOrderState=Submitted orderId='1463dbcb6c574f2f88d33c177867fdb0' account='Playback101' name='Entry' orderState=Submitted instrument='@NAS100' orderAction=Sell limitPrice=0 stopPrice=0 quantity=1 orderType='Market' filled=0 averageFillPrice=0 time='2023-09-29 06:28:25' statementDate='2023-09-29' error=NoError comment='' nr=-1
    2023-10-06 18:37:22:809 (Playback Connection) Cbi.Account.OrderUpdateCallback: realOrderState=Accepted orderId='1463dbcb6c574f2f88d33c177867fdb0' account='Playback101' name='Entry' orderState=Accepted instrument='@NAS100' orderAction=Sell limitPrice=0 stopPrice=0 quantity=1 orderType='Market' filled=0 averageFillPrice=0 time='2023-09-29 06:28:25' statementDate='2023-09-29' error=NoError comment='' nr=-1
    2023-10-06 18:37:22:809 (Playback Connection) Cbi.Account.OrderUpdateCallback: realOrderState=Working orderId='1463dbcb6c574f2f88d33c177867fdb0' account='Playback101' name='Entry' orderState=Working instrument='@NAS100' orderAction=Sell limitPrice=0 stopPrice=0 quantity=1 orderType='Market' filled=0 averageFillPrice=0 time='2023-09-29 06:28:25' statementDate='2023-09-29' error=NoError comment='' nr=-1
    2023-10-06 18:37:22:820 (Playback Connection) Cbi.Simulator.Fill1: realOrderState=Working orderId='1463dbcb6c574f2f88d33c177867fdb0' maxFillQuantity=1 price=14719.39 thread=47
    2023-10-06 18:37:22:820 (Playback Connection) Cbi.Simulator.Fill2: realOrderState=Working orderId='1463dbcb6c574f2f88d33c177867fdb0' fillQuantity=1 price=14719.39
    2023-10-06 18:37:22:820 (Playback Connection) Cbi.Account.OrderUpdateCallback: realOrderState=Filled orderId='1463dbcb6c574f2f88d33c177867fdb0' account='Playback101' name='Entry' orderState=Filled instrument='@NAS100' orderAction=Sell limitPrice=0 stopPrice=0 quantity=1 orderType='Market' filled=1 averageFillPrice=14719.39 time='2023-09-29 06:28:25' statementDate='2023-09-29' error=NoError comment='' nr=4
    2023-10-06 18:37:22:853 (Playback Connection) NinjaScript.AtmStrategy.ManageBrac****rders0: account='Playback101' instrument='@NAS100' id='289835543' filled=1 outstanding=0 stopTargetHandling=PerEntryExecution filledOrders='1463dbcb6c574f2f88d33c177867fdb0+=1 ' outstandingOrders='' thread=47
    2023-10-06 18:37:22:855 (Playback Connection) NinjaScript.AtmStrategy.ManageBrac****rders1: account='Playback101' instrument='@NAS100' id='289835543' initialEntryOrderId='1463dbcb6c574f2f88d33c177867f db0' bracket=0 qty=1 stopOrdersOutstandingQuantity=0 quantity2Add=1 exitOrders=''
    2023-10-06 18:37:22:859 (Playback Connection) NinjaScript.AtmStrategy.ManageStopOrder: account='Playback101' instrument='@NAS100' id='289835543' idx=0 orderType=StopMarket quantity=1 limitPrice=0 stopPrice=14737.5 oco='720485d11d97485b9b75924348dace07'
    2023-10-06 18:37:22:859 (Playback Connection) Cbi.Account.CreateOrder: orderId='4f031656ea8b4cc49600379ccdb5393d' account='Playback101' name='Stop1' orderState=Initialized instrument='@NAS100' orderAction=BuyToCover orderType='Stop Market' limitPrice=0 stopPrice=14737.5 quantity=1 tif=Gtc oco='720485d11d97485b9b75924348dace07' filled=0 averageFillPrice=0 onBehalfOf='' id=38409 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29' id=-1 comment=''
    2023-10-06 18:37:22:859 (Playback Connection) Cbi.Account.Submit0: realOrderState=Initialized isPendingSubmit=False orderId='4f031656ea8b4cc49600379ccdb5393d' account='Playback101' name='Stop1' orderState=Initialized instrument='@NAS100' orderAction=BuyToCover orderType='Stop Market' limitPrice=0 stopPrice=14737.5 quantity=1 tif=Gtc oco='720485d11d97485b9b75924348dace07' filled=0 averageFillPrice=0 onBehalfOf='' id=38409 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29'
    2023-10-06 18:37:22:860 (Playback Connection) Cbi.Account.Submit1: realOrderState=Initialized orderId='4f031656ea8b4cc49600379ccdb5393d' account='Playback101' name='Stop1' orderState=Initialized instrument='@NAS100' orderAction=BuyToCover orderType='Stop Market' limitPrice=0 stopPrice=14737.5 quantity=1 tif=Gtc oco='720485d11d97485b9b75924348dace07' filled=0 averageFillPrice=0 onBehalfOf='' id=38409 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29'
    2023-10-06 18:37:22:873 (Playback Connection) Cbi.Simulator.Submit: realOrderState=Initialized orderId='4f031656ea8b4cc49600379ccdb5393d' account='Playback101' name='Stop1' orderState=Submitted instrument='@NAS100' orderAction=BuyToCover orderType='Stop Market' limitPrice=0 stopPrice=14737.5 quantity=1 tif=Gtc oco='720485d11d97485b9b75924348dace07' filled=0 averageFillPrice=0 onBehalfOf='' id=38409 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29' delay=0
    2023-10-06 18:37:22:874 (Playback Connection) Cbi.Account.OrderUpdateCallback: realOrderState=Submitted orderId='4f031656ea8b4cc49600379ccdb5393d' account='Playback101' name='Stop1' orderState=Submitted instrument='@NAS100' orderAction=BuyToCover limitPrice=0 stopPrice=14737.5 quantity=1 orderType='Stop Market' filled=0 averageFillPrice=0 time='2023-09-29 06:28:25' statementDate='2023-09-29' error=NoError comment='' nr=-1
    2023-10-06 18:37:22:874 (Playback Connection) Cbi.Account.OrderUpdateCallback: realOrderState=Accepted orderId='4f031656ea8b4cc49600379ccdb5393d' account='Playback101' name='Stop1' orderState=Accepted instrument='@NAS100' orderAction=BuyToCover limitPrice=0 stopPrice=14737.5 quantity=1 orderType='Stop Market' filled=0 averageFillPrice=0 time='2023-09-29 06:28:25' statementDate='2023-09-29' error=NoError comment='' nr=-1
    2023-10-06 18:37:22:874 (Playback Connection) Cbi.Account.CreateOrder: orderId='4df91db366d649ef91e9af4add468dfe' account='Playback101' name='Target1' orderState=Initialized instrument='@NAS100' orderAction=BuyToCover orderType='MIT' limitPrice=0 stopPrice=14692 quantity=1 tif=Gtc oco='720485d11d97485b9b75924348dace07' filled=0 averageFillPrice=0 onBehalfOf='' id=38410 time='2023-09-29 06:28:25' gtd='2099-12-01' statementDate='2023-09-29' id=-1 comment=''

    Log cut short to not exceed max msg size, but it just goes on like this...​

    #2
    Hello pjsmith,

    Do you have a sample of what code is being used? Can you use the SampleATMStrategy and modify it to produce the problem? The log information would not point to a specific problem.

    Comment


      #3
      Hello,

      No, I don't, but in testing, this happens when the stop gets hit. Only when the stop gets hit, hence no code is actually executing other than NT8 native code. It is a managed ATM.

      Comment


        #4
        Hmmmm.. Change to a simulated stop, and the issue does not occur.

        Comment


          #5
          I'll live with the SIM stop.

          Comment


            #6
            Hello pjsmith,

            I would need to see what code is being used to know what the problem may be. Without a specific error or specific direction/code I couldn't really suggest anything other than troubleshooting further.

            I would suggest making a copy of the SampleATMStrategy script and then modify it to produce the error, after doing that attach that file.

            Comment


              #7
              Easier to live with the workaround than debug nt8, but, thanks...

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              41 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              124 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              64 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              41 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              46 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X