Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator loses settings upon restart

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

    #16
    thats fantastic thankyou!!

    Comment


      #17
      I have inserted the code to a fully copied set of the data file but get this error when i try to save it.

      "Unhandled exception. At least one object must implement IComparable"


      what does this mean please

      thankyou​

      Comment


        #18
        Hello,

        Can you send a screenshot of the error?

        Comment


          #19
          certainly

          here it is
          Click image for larger version

Name:	Screenshot 2024-10-10 152306.png
Views:	70
Size:	6.3 KB
ID:	1321000

          Comment


            #20
            Hello,

            You'll need to debug the script to see which line of code is throwing these error. I recommend commenting out lines of code until the error stops, then uncomment again to confirm which line of code is causing the error.

            Comment


              #21
              i managed to get that done and now there is no erroe -- however i do not get the options in the indicators section to change the colour parameters as per the original code

              Comment


                #22
                thankyou again

                Click image for larger version

Name:	Screenshot 2024-10-10 164927.png
Views:	76
Size:	19.4 KB
ID:	1321012 Click image for larger version

Name:	Screenshot 2024-10-10 165001.png
Views:	73
Size:	36.4 KB
ID:	1321013

                Comment


                  #23
                  Hello,

                  Make sure the code in the Properties section is properly defined to allow you to specify user brushes. Also make sure you have not deleted the inputs from State.SetDefaults.



                  You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services.

                  Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.

                  Comment


                    #24
                    I may be missing something obvious but do i put the

                    Browsable section of code below every XmlIgnore part

                    or all "browsable" items together?

                    Comment


                      #25
                      Hello,

                      Each brush input needs to be set up like the example I provided in my previous response:

                      Code:
                      [XmlIgnore]
                      [Display(Name = "Valid Highs", GroupName = "Display", Order = 1)]
                      public Brush ValidHighColor { get; set; }​
                      
                      [Browsable(false)]
                      public string ValidHighColorSerialize
                      {
                      get { return Serialize.BrushToString(ValidHighColor); }
                      set { ValidHighColor = Serialize.StringToBrush(value); }
                      }

                      Comment


                        #26
                        great !

                        thats what i have done.

                        just need to find out why the settings arent showing as im not aware of changing anything.

                        is there a way of duplicating the indicator so i can test the inputs on the original ?
                        or is a full copy paste acceptable

                        Comment


                          #27
                          Hello,

                          You can right-click within the Editor > Save As to save a new copy.

                          Comment


                            #28
                            Thankyou

                            i do this and then get compile errors.

                            im goint to delete all my scripts and restart i think

                            Comment


                              #29
                              WOW sorted it nearly!

                              i can save all my colours now but how to i save the widths with the "public int"?

                              as below

                              [XmlIgnore]
                              [Display(Name = "Validation Line width", GroupName = "Display", Order = 5)]
                              public int ValidLineWidth { get; set; }


                              thankyou again

                              Comment


                                #30
                                Hi again

                                I cant seem to get this last bit working - any assisitance will be appreciated

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                608 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                355 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                105 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                560 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                561 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X