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

Error cant save workspace

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

    Error cant save workspace

    Hi

    I have an Indicator that compiles properly and also does what it is supposed to do on the chart

    However when I try to save the workspace i get this error
    Could not save indicator 'myindicator:' There was an error generating the XML document.

    Any ideas what causes that issue??

    Thank you in advance

    #2
    Hello Richbois,

    Thank you for writing in.

    Without the full code we're unable to test on our end.

    If you’d like to send a copy of the indicator you’re running, I can take a look and see if anything jumps out.

    To export a NinjaScript from NinjaTrader 8 do the following:
    From the Control Center window select Tools -> Export -> NinjaScript...
    Click Add>Select the indicator>OK>Export.
    Then attach that file you saved; under My Docs>NT8>Bin>Custom>Select the downloaded .zip file.

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      can i have your email so i can send it

      thanks

      Comment


        #4
        Hello Richbois,

        Please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.

        I look forward to receiving your email.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Was this indicator converted from NT7 ?
          I have had seen this problem several times and each time it was associated with the
          Property Grid inputs. A simple thing to try is to comment out the complete properties grid.
          If you have public vars declared there that you use in your program you may need to comment them
          as well. But if you can compile it and then Save you will know where the problem is. Simply un comment a section at a time.

          Comment


            #6
            Originally posted by JerryWar View Post
            Was this indicator converted from NT7 ?
            I have had seen this problem several times and each time it was associated with the
            Property Grid inputs. A simple thing to try is to comment out the complete properties grid.
            If you have public vars declared there that you use in your program you may need to comment them
            as well. But if you can compile it and then Save you will know where the problem is. Simply un comment a section at a time.
            Yes is is a attempt at converting from NT7
            will give your idea a try

            Thanks

            Comment


              #7
              Originally posted by JerryWar View Post
              Was this indicator converted from NT7 ?
              I have had seen this problem several times and each time it was associated with the
              Property Grid inputs. A simple thing to try is to comment out the complete properties grid.
              If you have public vars declared there that you use in your program you may need to comment them
              as well. But if you can compile it and then Save you will know where the problem is. Simply un comment a section at a time.
              I did what you said and narrowed it down to these 2

              [Display(ResourceType = typeof(Custom.Resource), Name = "Color for Banners", GroupName = "NinjaScriptParameters", Order = 4)]
              public Brush vcolor
              {
              get { return vColor; }
              set { vColor = value; }
              }


              [Browsable(false)]
              public string vColorSerialize
              {
              get { return Serialize.BrushToString(vColor); }
              set { vColor = Serialize.StringToBrush(value); }
              }

              Obviously i dont need both that is a starter but If i keep the 1st only then it wont save if i keep the 2nd then i cant choose a color in the parameters

              any idea where the mistake is

              thanks in advance

              Comment


                #8
                You need both sections.
                Try adding [XmlIgnore()]
                before the first.

                Comment


                  #9
                  Originally posted by JerryWar View Post
                  You need both sections.
                  Try adding [XmlIgnore()]
                  before the first.
                  That did the trick

                  Thank you very much

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by aussugardefender, Today, 01:07 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post aussugardefender  
                  Started by pvincent, 06-23-2022, 12:53 PM
                  14 responses
                  238 views
                  0 likes
                  Last Post Nyman
                  by Nyman
                   
                  Started by TraderG23, 12-08-2023, 07:56 AM
                  9 responses
                  383 views
                  1 like
                  Last Post Gavini
                  by Gavini
                   
                  Started by oviejo, Today, 12:28 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post oviejo
                  by oviejo
                   
                  Started by pechtri, 06-22-2023, 02:31 AM
                  10 responses
                  125 views
                  0 likes
                  Last Post Leeroy_Jenkins  
                  Working...
                  X