Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator doesnt get saved in template

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

    Indicator doesnt get saved in template

    Hi i have a customm indicator that loads fine. but when i apply to template, next time i open NT indicator doesnt load and i have to reinsert indicator each time. What would cause this?
    Thank you

    #2
    Hello tkaboris,

    Thank you for your post.

    Is this an indicator you developed or was it imported from a third party? When you open NinjaTrader and notice that the indicator did not load, are there any error messages on the Log tab of the Control Center? If so, what do the errors report?

    I look forward to your reply.

    Comment


      #3
      HI thank you. I had to modify third party indicator. So i guess i made a mistake during renaming something?
      down there in this section?
      region NinjaScript generated code. Neither change nor remove

      Click image for larger version

Name:	image.png
Views:	178
Size:	90.9 KB
ID:	1273459

      Comment


        #4
        I checked that area and indicator name was changed becacuse it was duplicate in my system.

        Comment


          #5
          When i changed class name i simply did find and replacec all occurences of class name...

          Comment


            #6
            Hello tkaboris,

            Thank you for your reply.

            I suspect that a previous version of the indicator is saved in the template rather than the updated version. Please open NinjaTrader and reinsert the indicator as you have been doing, and then re-save the template with the new instance of the indicator added. Then, as a test, shut down and relaunch NinjaTrader to see if the indicator loads in the template without any errors.

            Please let me know if I may be of further assistance.

            Comment


              #7
              hi, no its still not saving it. i tried that many times...
              When i save template and save workspace it gives error in log couldnt save indicator....


              i attach indicator just in case.

              Comment


                #8
                Hello tkaboris,

                Thank you for your reply.

                What is the full error message in the log when you save the template and workspace related to "couldn't save indicator?" Please provide another screenshot of the message you are seeing.

                I look forward to your reply.

                Comment


                  #9
                  hi here it is
                  Click image for larger version

Name:	image.png
Views:	161
Size:	212.2 KB
ID:	1273487

                  Comment


                    #10
                    Hello tkaboris,

                    Thank you for your reply.

                    The error "There was an error reflecting type: ____" is sometimes related to objects that are public and do not use the XmlIgnore() attribute. I see this is the case with the four public Series<FVG> cs, cr, ls, and lr. As described in this thread, you can add the XmlIgnore() attribute so that the indicator saves properly in templates and workspaces:


                    Otherwise, you could change them to private instead of public.

                    I also see that you have some user defined parameter types (enums). It is a strongly suggested best practice to define the enums outside of the class in a custom namespace as demonstrated in the following sample:


                    Please let us know if we may be of further assistance.

                    Comment


                      #11
                      thanks i changed to private and now it saves.

                      Comment

                      Latest Posts

                      Collapse

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