Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Indicator Not 'Sticking'

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

    Custom Indicator Not 'Sticking'

    Hi

    Would there be a common reason why a custom indicator (or any indicator for that matter) applied to a chart would then be missing from the chart after restarting NinjaTrader?

    Am I missing something obvious?
    Last edited by FatCanary; 05-26-2016, 01:03 PM. Reason: Better title

    #2
    Hello FatCanary,

    There could be many reasons why this occurs as the software is in Beta. However please try and re import the custom script to troubleshoot.
    Shawn B.NinjaTrader Customer Service

    Comment


      #3
      Hi Shawn

      I was afraid of that. I was hoping I had missed something stupid.

      Guess I had better go digging...

      Would it be worth me exporting my indicator and then re-importing it?
      Might that cure the problem?

      Comment


        #4
        Exporting and then re-importing hasn't worked.

        Looks like a problem with my code then.

        Comment


          #5
          On second thoughts, how can it be my code?
          I can manually load my indicator and it works fine.

          I've tried custom indicators from the Version 8 Indicators forum and they all automatically load on NT startup.

          Comment


            #6
            Hello FatCanary,

            Could you please send me your log and trace files from within NinjaTrader. Go to Control Center-->Help-->Mail to Support in NinjaTrader. Put 'Att Shawn', in the subject field and enable 'Log and trace files'. Also, give a reference of this thread in the body of the email.
            Shawn B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by FatCanary View Post
              On second thoughts, how can it be my code?
              I can manually load my indicator and it works fine.

              I've tried custom indicators from the Version 8 Indicators forum and they all automatically load on NT startup.
              Look in the log for any errors. You probably have a serialization error.

              Comment


                #8
                Hi koganam

                Thanks for the response.

                In the log I have:
                Could not save indicator ':' There was an error generating the XML document.

                and

                Failed to restore Indicator 'Unknown'. Most likely (a) the implementation changed or (b) one or more properties have been renamed or removed or (c) the custom assembly which implements this Indicator no longer is there.

                Comment


                  #9
                  Fixed it.

                  I had:
                  Code:
                  #region Properties						
                  		[NinjaScriptProperty]		
                  		[Display(Name = "Border Color", Description = "Pane border color", GroupName = "Colors", Order = 0)]
                  		public Brush BorderBrush
                  There was a missing XmlIgnore.
                  I now have:
                  Code:
                  #region Properties						
                  		[XmlIgnore()]		
                  		[Display(Name = "Border Color", Description = "Pane border color", GroupName = "Colors", Order = 0)]
                  		public Brush BorderBrush

                  Comment


                    #10
                    Originally posted by FatCanary View Post
                    Fixed it.

                    I had:
                    Code:
                    #region Properties						
                    		[NinjaScriptProperty]		
                    		[Display(Name = "Border Color", Description = "Pane border color", GroupName = "Colors", Order = 0)]
                    		public Brush BorderBrush
                    There was a missing XmlIgnore.
                    I now have:
                    Code:
                    #region Properties						
                    		[XmlIgnore()]		
                    		[Display(Name = "Border Color", Description = "Pane border color", GroupName = "Colors", Order = 0)]
                    		public Brush BorderBrush
                    Which may be a suboptimal solution. You might want to properly serialize the brush instead.

                    Comment


                      #11
                      Hi koganam

                      I have:
                      Code:
                      [XmlIgnore()]		
                      		[Display(Name = "Border Color", Description = "Panel border color", GroupName = "Colors", Order = 0)]
                      		public Brush BorderBrush
                      		{	
                                  get { return borderBrush; }
                              	set { borderBrush = value; }
                                  }
                      				
                      		[Browsable(false)]
                          	public string BorderBrushSerialize
                          	{
                              	get { return Serialize.BrushToString(borderBrush); }
                                  set { BorderBrush = Serialize.StringToBrush(value); }
                          	}
                      Is that what you mean?

                      Comment


                        #12
                        Originally posted by FatCanary View Post
                        Hi koganam

                        I have:
                        Code:
                        [XmlIgnore()]		
                        		[Display(Name = "Border Color", Description = "Panel border color", GroupName = "Colors", Order = 0)]
                        		public Brush BorderBrush
                        		{	
                                    get { return borderBrush; }
                                	set { borderBrush = value; }
                                    }
                        				
                        		[Browsable(false)]
                            	public string BorderBrushSerialize
                            	{
                                	get { return Serialize.BrushToString(borderBrush); }
                                    set { BorderBrush = Serialize.StringToBrush(value); }
                            	}
                        Is that what you mean?
                        Absolutely. You did not show that code originally, so I did not know that you had already done it. You have really resolved the problem.

                        Comment


                          #13
                          Yeah, sorry, I was just showing the erroneous part of my code.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by algospoke, Yesterday, 06:40 PM
                          2 responses
                          19 views
                          0 likes
                          Last Post algospoke  
                          Started by ghoul, Today, 06:02 PM
                          3 responses
                          14 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by jeronymite, 04-12-2024, 04:26 PM
                          3 responses
                          45 views
                          0 likes
                          Last Post jeronymite  
                          Started by Barry Milan, Yesterday, 10:35 PM
                          7 responses
                          21 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by AttiM, 02-14-2024, 05:20 PM
                          10 responses
                          181 views
                          0 likes
                          Last Post jeronymite  
                          Working...
                          X