Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DB " Error on executing DB Command......

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

    DB " Error on executing DB Command......

    Hi - I am working with a programmer to develop a strategy, however we are encountering the following issue, any idea how to fix or guide him in the right direction?

    Thanks


    Click image for larger version

Name:	image.png
Views:	98
Size:	984.4 KB
ID:	1302867

    #2
    Hello Richozzy38,

    I'm not able to read the full error message. Can you copy and paste this? (select and Ctrl + c to copy the error from the Log tab of the Control Center)

    Are you able to reproduce testing the SampleMACrossover?

    If you remove the instance of the strategy and add a new instance does the error still occur?

    What is the specific line of code that is causing the error? (Debug by commenting out code or using prints or visual studio debugging to find the line causing the error)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi, here is what I was able to copy, its happening on 2 different computers, I've tried removing it and re-installing it I get the same, I will try to get with the programmer for the other answers, thanks

      Error on executing DB command: System.InvalidOperationException: There was an error reflecting type 'NinjaTrader.NinjaScript.Strategies.RSIZoneBlock'. ---> System.InvalidOperationException: Cannot serialize member 'NinjaTrader.NinjaScript.Strategies.RSIZoneBlock.b uy' of type 'NinjaTrader.NinjaScript.Series`1[[System.Boolean mscorlib Version=4.0.0.0

      Comment


        #4
        Click image for larger version

Name:	image.png
Views:	74
Size:	1.08 MB
ID:	1302906
        I was able to copy this​

        Comment


          #5
          Hello Richozzy38,

          The error serializing could be a public variable that is not using the XmlIgnore attribute.

          What is the code causing the error?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hi - Thanks for the help, programmer made all variables private and error has disappeared.

            Comment


              #7
              Hello Richozzy38,

              Did any of those properties need to be public?
              (Everything should be private unless you are intentionally exposing it to the UI or to other scripts)

              If there was something that actually needed to be public and you would like assistance making sure it's properly serialized, let us know.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Will consult with the programmer, thanks again.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Yesterday, 05:17 AM
                0 responses
                54 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                130 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                72 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                44 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                49 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X