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

Every ninja update breaks indicator template saving

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

    Every ninja update breaks indicator template saving

    Every time Ninja releases an update it breaks template saving for my indicators. This has only been happening the last 3 or 4 updates. A recompile fixes this issue, but this is starting to annoy my customers that they need to reinstall the indicators compiled on the latest ninja version every time. What is going on? The error that shows is "Unhandled exeption: There was an error generating the XML document." This is very annoying. Again, nothing but a recompile on the latest ninja version is done and the problem is solved. Absolutely zero lines of code have been changed so it is not a code problem.

    #2
    Hello zextra,

    Do you have a example which can generate this error after updating that we can test? We have the prior installer listed on the main download page so this is something that you can test to locate what syntax is required to see that. If you have an example of the properties where that happens I would be happy to take a look into that and report what I can.

    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment


      #3
      zextra: does your indicator properties contain TextPosition enum from NinjaTrader.NinjaScript.DrawingTools?

      NT: if I use this enum .19 NT dlls (created by VS) won't save templates nor they can load back templates from .18.1

      Comment


        #4
        It uses TextAlignment. Sounds similar to TextPosition. Will this breakage be an ongoing thing for every update? Or can we finally have an update without breakage?

        Comment


          #5
          Hello zextra,

          As we don't have the details surrounding what is breaking with your script this question really could not be answered. TextAlignment is not the same as TextPosition however they are both enums, perhaps you have used it in an incorrect way?

          We would need to see an example of what code is failing to further this question or to know if there would be any expectations surrounding what you are trying to do. I would still suggest to test for the error by installing the prior release to re create the situation you see the error. This would help you to isolate what code is needed to see the problem so we can figure out a solution going forward.

          Please let me know if I may be of additional assistance.
          JesseNinjaTrader Customer Service

          Comment


            #6
            Look Jesse, this issue only started happening a few releases ago and none of my code has changed. Now after every NinjaTrader update the templates break until the indicators are recompiled on the latest version of Ninja. Half a year ago this wasn't a problem at all and templates were not breaking. None of the code has changed since then. You cannot say the I am using TestAlignment incorrectly. I'm pretty sure Ninja is broken. Why should Text Alignment break templates in the first place?? Its pretty straightforward, I have

            // Text alignment
            TextAlignment sa = TextAlignment.Center;

            Then it is used with draw

            Text text;
            text = Draw.Text(this, textname, false, texttext, x, ypos, yoff, c, textFont, sa, t, t, 0);

            Why does Ninja always blame the programmer for a broken platform? I am getting tired of Ninja issues all the time for stuff I didn't do, and then getting blamed that I am doing something incorrectly...

            Regards.

            Comment


              #7
              Hello zextra,

              Are you able to reproduce this behavior saving a template with a chart that has only NinjaTrader indicators on it (like the SMA) and no custom indicators?
              This would let us know the issue is with the platform and not with the script. If there is an issue with the platform and we are able to reproduce, we will report the bug to our development.

              If the issue is with the script, we are attempting to help you correct the error.

              The error message is saying the script has a property that needs to be properly serialized or ignored from xml with the [XmlIgnore()] attribute.


              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                It sounds like there is confusion. I will attempt to clarify. How can it be an error with my code if once recompiled on the newer version of NinjaTrader the template saving resumes working?

                Here's what happened

                1. Template saving / loading is working on 8.0.18.1 with my indicators
                2. Update to latest version of NinjaTrader 8.0.19.0
                3. Template saving is broken giving error "Unhandled exeption: There was an error generating the XML document."
                4. Recompile indicators on latest NinjaTrader 8 8.0.19.0
                5. Template saving / loading is working once again

                I hope this makes it clear as to what is going on. ZERO lines of code are changed in the process. It cannot be an error with the script if recompiling the indicators is what solves the issue. This problem has been occurring for the past few releases and having to recompile the indicators to fix the templates breaking. Have you guys been changing some enums every version? Is this why recompilation has been necessary?

                Please read Zapzap's post https://ninjatrader.com/support/foru...26#post1073326 in this thread as he is having the same issue.
                Last edited by zextra; 10-09-2019, 11:20 PM.

                Comment


                  #9
                  Hello Zapzap,

                  Please provide the script that can reproduce this behavior so that we may investigate.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Most of the code is commercial and proprietary. I am getting frustrated as this is NOT a code problem if a recompilation is what fixes the issue. Can you just tell us if some enums keep breaking between NinjaTrader releases, and why. And if this will continue with future releases. Why can't you guys just answer the question that was asked. ARE THE ENUMS BREAKING BETWEEN VERSIONS?

                    Comment


                      #11
                      Hello zextra,

                      I am getting frustrated as this is NOT a code problem if a recompilation is what fixes the issue.
                      I understand that the code compiles, however you can see problems even with compiled code. Compiling the code does not make it correct, that just means it compiled. XML serialization issues happen with compiled code in runtime, the error comes based on how the code is structured and used during serialization. A quick example of a situation that generates this error would be a public Brush property, there is a specific way to code Brush properties to correctly serialize. The code compiles but will generate an error when saving templates or the workspace if it is not coded correct.

                      Why does Ninja always blame the programmer for a broken platform? I am getting tired of Ninja issues all the time for stuff I didn't do, and then getting blamed that I am doing something incorrectly...
                      We are not blaming you, we are only trying to help you diagnose the situation. Because I don't know what code you have used I can't really say that this is a platform problem or a custom coding problem. Chelsea provided a suggestion of testing the system indicators to verify if this is a platform problem in a simple way, if you otherwise only see this with your item and no other items can recreate the issue we can conclude this is somehow related to that script and the code/situation used. I will be happy to write up a report and get this into development if there is an issue here but we need to do the first step and figure out why this is happening with your script.

                      Why can't you guys just answer the question that was asked. ARE THE ENUMS BREAKING BETWEEN VERSIONS?
                      We can't answer this because this is not something which has been reported as an issue to where I could provide that information. If you are seeing a problem with enums we would need you to report that along with a sample of how you are seeing the problem. I don't see anything that matches the description, however not much has been provided at this point so we will need to continue troubleshooting to uncover more details.


                      Please let me know if I may be of additional assistance.
                      JesseNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by algospoke, Today, 06:40 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post algospoke  
                      Started by maybeimnotrader, Today, 05:46 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post maybeimnotrader  
                      Started by quantismo, Today, 05:13 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post quantismo  
                      Started by AttiM, 02-14-2024, 05:20 PM
                      8 responses
                      168 views
                      0 likes
                      Last Post jeronymite  
                      Started by cre8able, Today, 04:22 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post cre8able  
                      Working...
                      X