Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

"Could not save indicator" error when tryoing to save worksapce

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

    "Could not save indicator" error when tryoing to save worksapce

    I got this error message when trying to save a workspace:
    Could not save indicator 'SmartMarketProfile:' There was an error reflecting type 'NinjaTrader.NinjaScript.Indicators.IntelliBot.Sma rtMarketProfile'.

    I searched history errors of this kind and none of the conditions are relevant in my case. I have commented all the calls from my main .cs to the .cs files with the logic and display and the error still exists. I will email this code to the support email [email protected] with a reference to this issue, so you can take a look.

    #2
    Hello Shai Samuel,

    I will be replying by email as you have not provided as the sample here. In the future, please use only one form of communication rather than inquiring twice about the same issue. We can work strictly through email if you don't want to provide a public sample. Otherwise, if you would like to use the forum I would suggest making a reduced sample that you can share publically.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,

      I had to complete my code before I was able to check the problem, but I now identify the cause of the error.

      I have created custom classes, that I used as a Series, and NT doesn't know how to serialize my class.

      Code:
             public Series<Distribution>     DistributionSeries;
      Any idea what I need to add to serialize my class to save it as part of the workspace?

      Comment


        #4
        Hello Shai Samuel,

        In general, you wouldn't serialize a series, do you have an [XmlIgnore()] attribute on this property? Only properties that should be saved should omit the xml ignore syntax.



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

        Comment


          #5
          Hi Jesse,

          Yes, I have [XmlIgnore()] attribute on all my properties, and these are not properties.

          I tested a new indicator with the same structure (a custom class which is set as a Series), and this is not the issue.

          Is there any way I can get a more detailed information about the nature of the error? The error message is so general and limited. Any debug or log, that can give me more information?

          Could not save indicator 'SmartMarketProfile:' There was an error reflecting type 'NinjaTrader.NinjaScript.Indicators.IntelliBot.Sma rtMarketProfile'.
          Last edited by Shai Samuel; 11-13-2018, 02:23 AM.

          Comment


            #6
            Shai Samuel,

            Not necessarily, you would likely need to further isolate which part is causing the problem by testing. This most often includes just commenting out the public properties you have used or items marked with "public" that are not methods and then find what the error location is.

            Because you are creating complex structures this is something you would need to debug opposed to there being a more specific NinjaTrader generated error. If a new indicator works, this is likely related to something specific in the script which you did not copy over in that test.

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

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by kujista, Today, 06:23 AM
            4 responses
            14 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by traderqz, Yesterday, 09:06 AM
            2 responses
            15 views
            0 likes
            Last Post traderqz  
            Started by traderqz, Today, 12:06 AM
            3 responses
            6 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by RideMe, 04-07-2024, 04:54 PM
            5 responses
            28 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by f.saeidi, Today, 08:13 AM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X