Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on executing DB command

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

    Error on executing DB command

    Hi,

    I have a strategy that I recently noticed was creating an error message in the log file. The strategy compiles without any issue and even functions correctly, or at least I have not been able to determine any issue with it. The error states.

    Error on executing DB command: System.InvalidOperationException: There was an error reflecting type ‘NinjaTrader.Ninjascript.Strategies.NAME

    Does anyone know what this is or what may be causing it? I likely would have never noticed it, but I could not get NT8 to save my workspace with this strategy. The inability to save the workspace with this strategy added to a chart is what actually led me to the log file.

    I would like to fix this if I can. Does anyone know what may be causing this or where I should begin to look in the strategy to determine the issue?

    Thank you,
    Ray

    #2
    Hello Ray,

    This might be a missing record in the database.

    May I have you update to the latest release 8.1.1.3, and then rename the database?
    https://account.ninjatrader.com/download
    • Shutdown NinjaTrader
    • Open the Documents > NinjaTrader 8 > db folder
    • Right click on NinjaTrader.sqlite and select "Rename"
    • Rename the file ' Original.NinjaTrader.sqlite'
    • Finally, start NinjaTrader
    ​Then add a new instance of the strategy to the chart or strategies tab of the control center and test for the error once more.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea, thank you. I will give this a try.

      Ray

      Comment


        #4
        Hi Chelsea,

        I updated to the latest version of NT, and then renamed the database as you described. But I'm still getting the same error and the workspace won't save with this strategy added to a chart.

        Any ideas of what else I could try?

        Thank you,
        Ray

        Comment


          #5
          Hello Ray,

          Do you have public types that are not using the XmlIgnore() attribute? (types other than string, bool, int, double, enum)
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hi Chelsea,

            I think that was the issue. I was using public instead of private.

            I'll let you know if I have any other issues.

            Thank you,
            Ray

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            66 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            141 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            76 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            47 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            51 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X