Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

deserialization problem

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

    deserialization problem

    Hi all ,

    I have a serious problem. I am about to deliver an indicator but I keep getting this message :
    Indicator 'NinjaTrader.Indicator.MyIndicator' could not be deserialized : There is an error in XML document(1,2079).

    This is something I have added lately because I wasn't getting that message before.

    I have added a lot of properties but when the property was a Color or a Font I have used the following syntax to serialize the objects :

    Code:
    [Browsable(false)]
    public string FontSerialize
     {
                get { return NinjaTrader.Gui.Design.SerializableFont.ToString(helper.captionFont); }
                set { helper.captionFont = NinjaTrader.Gui.Design.SerializableFont.FromString(value); }
            }
    For color I used :

    Code:
    [Browsable(false)]
            public string CloseTickColorSerialize
            {
                get { return NinjaTrader.Gui.Design.SerializableColor.ToString(helper.closeTickColor); }
                set { helper.closeTickColor = NinjaTrader.Gui.Design.SerializableColor.FromString(value); }
            }
    What could be wrong

    Is there a way to look at the XML file to get a clue ?

    #2
    Hello,

    Thanks for the forum post.

    Can you please remove the font property temporarly as a quick check to find out if its the font or the color that is causing the error. I have a feeling that it is the font serialization causing the issue however. Please comment this out and then just set a static font at the start of the indicator.

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      Brett

      Here is what seems the problem

      Code:
      [Description("")]
              [Category("Volume Properties")]
              [Gui.Design.DisplayName("Number Format")]
              
              public FormattingType VFormat
              {
                  get { return helper.VFormat; }
                  set {  helper.VFormat=value;}
              }
      I don't understand because FormattingType is an enum...

      Comment


        #4
        Hi blar58, that's right enums shouldn't need serialization - any change if you change category to GridCategory for NT7? Have you tried saving the indicator to a complete new workspace file, same issue then seen?

        Thanks,

        Comment


          #5
          Hi
          I faced the same problem when I updated the Gomi package indicators. I was able to workaround the issue by deleting the template file for that indicator in the $NT/templates/Indicator directory. I do not like that change since I will have to redo the defaults for these indicators.

          ===
          Update: It seems an enum value had some changes which was forcing the failure since the template saved for the indicator was using a value no longer valid. What we need is a better error message saying that the problem lies with the template saved for the indicator (and removing/editing that file will fix the problem).

          Right now a user is stuck dead in the water unless he knows where to find the xml file causing the problem (indicator template).
          Last edited by aviat72; 09-10-2011, 03:56 AM. Reason: Solution to the problem

          Comment


            #6
            Hello,

            Thanks for letting us know.
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

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