Announcement

Collapse
No announcement yet.

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.

    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.

        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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            663 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            376 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            110 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            575 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            580 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X