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

Serialize error

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

    Serialize error

    I get the error 'Indicator could not be serialized' when I try to save to a template, a chart which contains one specific custom indicator. What does this mean? The indicator works fine, but seems like any chart containing it cannot be saved as a template. Where do I look for clues as to what might be the issue?

    #2
    I would look to the indicator itself. I would look at the area where properties are defined as a start.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      There are no properties defined in this indicator (maybe that itself might be the issue?). What other parts of your code could issue that error? Maybe that can help give me some direction as to what to focus on.

      Originally posted by Josh View Post
      I would look to the indicator itself. I would look at the area where properties are defined as a start.

      Comment


        #4
        This error will not occur if you code along the lines of all other NT standard indicators only using documented NinjaScript properties and methods.

        Unfortunately we don't know which sections of your custom code broke the logic. I suggest giving it a fresh start by a wizard generated template and adding your custom code step to step to see where it finally breaks.

        Comment


          #5
          You have probably fixed the problem by now, but for the record I had the same problem and found this.

          I had defined a variable in the Ind1 code as an int and used it in a reference to another indicator, Ind2. Everything compiled just fine but it would not serialize when saving as a template. I found that the position in the reference to Ind2 where the int was used actually required a double by Ind2. I changed the variable in Ind1 from an int to a double and the problem was resolved.

          Comment


            #6
            I am having the same type of problem and have isolated it to the following statement in my Variables region:

            public DataSeries dsCalcVolume;

            using

            private DataSeries dsCalcVolume;

            works fine; however I would like another indicator to have access to this DataSeries...

            ?

            Thanks!

            =======================

            Resolved...

            Moved to Properties Region...
            Last edited by SteveB; 06-23-2008, 07:47 PM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Segwin, 05-07-2018, 02:15 PM
            14 responses
            1,789 views
            0 likes
            Last Post aligator  
            Started by Jimmyk, 01-26-2018, 05:19 AM
            6 responses
            837 views
            0 likes
            Last Post emuns
            by emuns
             
            Started by jxs_xrj, 01-12-2020, 09:49 AM
            6 responses
            3,293 views
            1 like
            Last Post jgualdronc  
            Started by Touch-Ups, Today, 10:36 AM
            0 responses
            13 views
            0 likes
            Last Post Touch-Ups  
            Started by geddyisodin, 04-25-2024, 05:20 AM
            11 responses
            63 views
            0 likes
            Last Post halgo_boulder  
            Working...
            X