Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't save template for indicator - XML error message - locks up certain charts?

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

    Can't save template for indicator - XML error message - locks up certain charts?

    Hello -

    I think this is a fairly simple indicator but I cannot save a template for it, and it won't save in a chart template or workspace template either. When I try and save the indicator template I get the attached XML error message.

    Can you look at the code and tell me 1) how to resolve this problem and 2) if the code can be improved? It appears low on the list on the NS Utilization Monitor, even when on six charts, so I don't think it's a resource hog. On the other hand, it seems to lock up my MES charts and may be the cause of a terrible data lag for MES (but no other instruments, including ES, M2K and MNQ).

    I am using Dimension4 to sync my computer clock every 5 minutes but my Data Lag Monitor for MES is reading 19.9 minutes.

    Thank you in advance for any help.



    Click image for larger version

Name:	OBV4MA XML error message.png
Views:	144
Size:	3.8 KB
ID:	1283901

    #2
    Hello JohnS52,

    Thank you for your post.

    Have the inputs in this indicator been properly serialized? Make sure any brush properties have the [XmlIgnore()] attribute.

    Below is a link to a forum post that has an example of a properly serialized input.

    https://forum.ninjatrader.com/forum/...575#post677575

    Please let us know if we can assist further.

    Comment


      #3
      Hello Gaby,

      Thank you for your reply. I get a lot of error messages when I follow your guidance.

      Any suggestions?

      Comment


        #4
        Hello,

        Can you share exactly what error messages you are seeing? Please share the full error message and/or provide a screenshot.

        Thank you in advance.

        Comment


          #5
          Hello ,

          Are you able to see this? I will do it full-size.


          Click image for larger version

Name:	BrushSerialize.png
Views:	104
Size:	78.8 KB
ID:	1284004

          Comment


            #6
            Hello,

            You are missing the following using statements:

            using System.Xml.Serialization;

            using System.ComponentModel;

            Please add those to the using declarations section and recompile.

            Comment


              #7
              That worked perfectly. Thank you so much!

              Comment

              Latest Posts

              Collapse

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