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:	115
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:	87
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 Mindset, 04-21-2026, 06:46 AM
                0 responses
                88 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by M4ndoo, 04-20-2026, 05:21 PM
                0 responses
                134 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Started by M4ndoo, 04-19-2026, 05:54 PM
                0 responses
                68 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Started by cmoran13, 04-16-2026, 01:02 PM
                0 responses
                119 views
                0 likes
                Last Post cmoran13  
                Started by PaulMohn, 04-10-2026, 11:11 AM
                0 responses
                69 views
                0 likes
                Last Post PaulMohn  
                Working...
                X