Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT9b9 exception/crash on startup if "enabled" strategy in workspace

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

    NT9b9 exception/crash on startup if "enabled" strategy in workspace

    I had a simple strategy (without even a single order) in the start up workspace. The strategy - since used only for development purposes - has IsEnabled = true set in State == State.SetDefaults.

    Now , when I start NT it throws an exception which clearly comes from a conflict: no connection yet strategy is enabled.

    Attached is the error message.
    Attached Files
    Last edited by gregid; 03-03-2016, 04:29 AM.

    #2
    Hello,

    Thank you for the question.

    I have submitted a feature request for this.

    IsEnabled and Enabled (NT7) are actually not supported/documented properties so for the time being this is expected.

    We are currently tracking demand for the ability to autostart strategies in SFT-392 so development is currently looking into this subject.

    For the time being I could only suggest to not utilize this property or ensure you are setting it to false before saving the workspace and restarting.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse,

      Until you find the solution for autostarting strategies I think the behaviour for now should be NT overwriting strategy setting and simply disabling it instead of crashing NT. So there are 2 separate issues:
      1. Bug - NT crashes instead of disabling the strategy
      2. Feature request for allowing autostart (my +1 vote).

      Comment


        #4
        Is this bug going to be fixed in beta11? As it always crashes the NT I would think it should be high priority bug but I see it still persists in beta10

        Comment


          #5
          Hello gregid,

          Thank you for your response.

          The Enabled options (Enabled and IsEnabled) are not supported. Their behavior on start up of the platform has no expectations as it is not intended for use in NinjaScript. At this point the suggestion has been submitted to development for this to be implemented. You would need to remove Enabled or IsEnabled respectively from any scripts if you do not wish to see these crashes on start up of the platform.

          Comment


            #6
            Thanks Patrick for your reply but I will argue that anything that crashes your product is a reason for concern. The use of IsEnabled for script is particularly useful during development but what happens if you accidentally save the workspace with IsEnabled = true and you open NT next time? It will keep crashing right on start up until you delete the workspace file.
            To put it bluntly - I don't find it too comforting - the idea that you consider a bug fix (improper exception handling and subsequent crash) as a feature request.
            I hope my main concern is now clear.

            Comment


              #7
              Hello,

              This item has been submitted to development for review so they are aware of this item.

              Regarding if you fail to remove the syntax prior to saving the workspace, you can start NinjaTrader in SafeMode by holding the Left Control key while double clicking the NinjaTrader icon.

              You should see " Safe Mode" printed in the splash screen and no workspaces will open allowing you to change the script to a working state.

              Please let me know if I may be of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                Update: The exception handling for this issue is still not fixed ie: NT8 RC2 crashes on start up.

                As mentioned above the problem is not with this being not supported but with unhandled exception that crashes NT.

                For those who use IsEnabled = true in DEVELOPMENT who need a workaround here is what I use in my SetDefaults:
                Code:
                if (Account != null && Account.Connection != null && Account.Connection.Status == ConnectionStatus.Connected)
                {
                    IsEnabled = true;
                }
                else IsEnabled = false;
                This does what exception handling should be doing.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by geddyisodin, Today, 05:20 AM
                0 responses
                1 view
                0 likes
                Last Post geddyisodin  
                Started by JonesJoker, 04-22-2024, 12:23 PM
                6 responses
                32 views
                0 likes
                Last Post JonesJoker  
                Started by GussJ, 03-04-2020, 03:11 PM
                12 responses
                3,239 views
                0 likes
                Last Post Leafcutter  
                Started by AveryFlynn, Today, 04:57 AM
                0 responses
                5 views
                0 likes
                Last Post AveryFlynn  
                Started by RubenCazorla, 08-30-2022, 06:36 AM
                3 responses
                79 views
                0 likes
                Last Post PaulMohn  
                Working...
                X