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

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:	79
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.
    Gaby V.NinjaTrader Customer Service

    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.
        Gaby V.NinjaTrader Customer Service

        Comment


          #5
          Hello ,

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


          Click image for larger version

Name:	BrushSerialize.png
Views:	44
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.
            Gaby V.NinjaTrader Customer Service

            Comment


              #7
              That worked perfectly. Thank you so much!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by fx.practic, 10-15-2013, 12:53 AM
              5 responses
              5,406 views
              0 likes
              Last Post Bidder
              by Bidder
               
              Started by Shai Samuel, 07-02-2022, 02:46 PM
              4 responses
              98 views
              0 likes
              Last Post Bidder
              by Bidder
               
              Started by DJ888, Yesterday, 10:57 PM
              0 responses
              8 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by MacDad, 02-25-2024, 11:48 PM
              7 responses
              160 views
              0 likes
              Last Post loganjarosz123  
              Started by Belfortbucks, Yesterday, 09:29 PM
              0 responses
              9 views
              0 likes
              Last Post Belfortbucks  
              Working...
              X