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:	79
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:	82
Size:	19.4 KB
ID:	1321012 Click image for larger version

Name:	Screenshot 2024-10-10 165001.png
Views:	81
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 CarlTrading, 03-31-2026, 09:41 PM
                                1 response
                                47 views
                                0 likes
                                Last Post NinjaTrader_ChelseaB  
                                Started by CarlTrading, 04-01-2026, 02:41 AM
                                0 responses
                                23 views
                                0 likes
                                Last Post CarlTrading  
                                Started by CaptainJack, 03-31-2026, 11:44 PM
                                0 responses
                                33 views
                                1 like
                                Last Post CaptainJack  
                                Started by CarlTrading, 03-30-2026, 11:51 AM
                                0 responses
                                51 views
                                0 likes
                                Last Post CarlTrading  
                                Started by CarlTrading, 03-30-2026, 11:48 AM
                                0 responses
                                42 views
                                0 likes
                                Last Post CarlTrading  
                                Working...
                                X