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 charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            72 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            152 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            162 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            100 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            288 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X