Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cant start after Crash SIM101 Not Connected

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

    Cant start after Crash SIM101 Not Connected

    NT8 crashed and I had to abort as I was changing some chart settings. I will see if I can reproduce later. But the main issue is when I restarted, I got an Assertion Failed: "Account 'Sim101' is not Connected".

    I don't seem to be able to get by this error and restart NT8, keeps crashing when I try to ignore/Retry/Abort. Attached is the Error and a short of the Control Center (could not select window, needed to dump screen an crop this out). As best I can tell, the strategies are trying to come up as Enabled but the connection has not been made.

    I am going to try an recover by removing the strategy from the bin directory to see if that fails and comes up without needing to delete my DB file again.
    Attached Files

    #2
    I added @@ in front of the file name to disable it. On restart this didn't take effect (probably already compiled from last run).

    I then removed the "NinjaTrader.Custom.dll" to force it to loose its custom scripts. NT8 started up at this point, I then recompiled and everything is back to normal.

    Comment


      #3
      From your screenshot it looks like your strategies are enabled, however you're not connected to any account.

      Are you trying to auto start the strategy through it's constructor or through SetDefaults?
      MatthewNinjaTrader Product Management

      Comment


        #4
        Hi Matt,

        The enable is in the OnStateChange():
        Code:
         [COLOR=#0000ff]protected[/COLOR] [COLOR=#0000ff]override[/COLOR] [COLOR=#0000ff]void[/COLOR] [COLOR=#080808]OnStateChange[/COLOR]()
         {
         [COLOR=#0000ff]if[/COLOR] ([COLOR=#080808]State[/COLOR] == [COLOR=#080808]State[/COLOR].[COLOR=#080808]SetDefaults[/COLOR])
         {
         [COLOR=#080808]IsEnabled[/COLOR]=[COLOR=#0000ff]true[/COLOR];
        To be clear, normally NT8 disables these strategies upon startup (of NT8 as this was). This was me simply starting NT8 after a crash, something mush have been left bad in the DB or something for this to be enabled while NT8 was starting.

        Comment


          #5
          I think I save the DB file, I have it zipped if you want it.

          Comment


            #6
            Originally posted by NJA_MC View Post
            I think I save the DB file, I have it zipped if you want it.
            No worries, I can reproduce. It's not related to the crash, but simply that it's attempting to enable when there is not an account. I'm not sure why you've experience that it simply disables the strategy as you said...

            So we're on the same page, can you try the following:

            - Ensure you have Connect on Startup unchecked
            - Setup your strategy with IsEnabled = true from SetDefaults on a chart
            - Restart NinjaTrader 8

            Do you end up with the same assertion? If you check the strategies grid, are the strategies "enabled" (but grayed out)?

            Or do they simply "disabled' as you said (can you clarify what happens here exactly, because this has not been my experience).

            I will check with development on expectations in this scenario.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Okay, followed the instructions as stated and NT8 did give the same exception error so it is reproducable and not related to the prior crash.

              Comment


                #8
                I spoke with development and setting IsEnabled in SetDefaults is not something we can currently support. From my testing, as long as you have an account connected, it will work, but as you can see there are issues if there is not currently an account connected.

                To clarify, are you looking to just have the strategy enabled as soon as you have added to the chart? Or are you seeking some sort of "Auto start strategy" behavior which would make sure the strategy is setup and configured to run as soon as you start NinjaTrader?
                MatthewNinjaTrader Product Management

                Comment


                  #9
                  My goal was just to enable once added to a chart. I was still expecting to enable the strategy once NT8 started.

                  I am seeing other "issues" that might be related to this pesky flag and I have stopped using it for now. I would put this as a low priority, maybe even disable this setting in future revisions until you can revisit its implementation.

                  Comment


                    #10
                    Actually for me, if you can have the "Enabled" flag in the strategy box default to some system setting (or ENABLED). That would be great. If I open the Strategy dialog, I generally want to enable the strategy. But for consistancy with NT7 you may want to make this a system default which defaults to "disabled".

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Mestor, 03-10-2023, 01:50 AM
                    16 responses
                    389 views
                    0 likes
                    Last Post z.franck  
                    Started by rtwave, 04-12-2024, 09:30 AM
                    4 responses
                    31 views
                    0 likes
                    Last Post rtwave
                    by rtwave
                     
                    Started by yertle, Yesterday, 08:38 AM
                    7 responses
                    29 views
                    0 likes
                    Last Post yertle
                    by yertle
                     
                    Started by bmartz, 03-12-2024, 06:12 AM
                    2 responses
                    22 views
                    0 likes
                    Last Post bmartz
                    by bmartz
                     
                    Started by funk10101, Today, 12:02 AM
                    0 responses
                    7 views
                    0 likes
                    Last Post funk10101  
                    Working...
                    X