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

Indicator could not be serialized

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

    Indicator could not be serialized

    Hello, dear support

    I am writing now one indicator and when I try to save it into template I get the next message:
    "Indicator "Ninjatrader.Indicator...." could not be serialized. Please refer help for more information on serializing indicators.

    I am using followed properties:

    Code:
    		[Description("Bar span to consider for breakouts")]
    		[GridCategory("Parameters")]
    		public int Span {
    			get { return span; }
    			set { span = Math.Max(1, value); }
    		}
    
    		[Description("What to display (0=none, 1=dots, 2=lines, 3=both)")]
    		[GridCategory("Parameters")]
    		[Gui.Design.DisplayNameAttribute("Display Type")]
    		public int DisplayType {
    			get { return displayType; }
    			set { displayType = Math.Max(0, value); }
    		}
    				
    		[Description("Display/Hide switch points")]
    		[GridCategory("Parameters")]
    		public bool DisplayDiamonds {
    			get { return displayDiamonds; }
    			set { displayDiamonds = value; }
    		}
    And Misc to access some data from other indicators/strategies

    Code:
    		public  AkPoint FirstPoint
    		{
    			get { return patterns.P1; }
    		}		
    	
    		public  AkPoint SecondPoint
    		{
    			get { return patterns.P2; }
    		}		
    		
    		public  AkPoint CurrentPoint
    		{
    			get
    			{
    				Update();
    				return patterns.Current;
    			}
    		}		
    		
    		public  AkDirrection Dirrection
    		{
    			get
    			{
    				Update();
    				return patterns.Dirrection;
    			}
    		}	
    		
    		public  BoolSeries Switcher
    		{
    			get
    			{
    				return this.switcher;
    			}
    		}		
    
    		public AkPoint LastHighPoint
    		{
    			get
    			{
    				Update();
    				return lastHigh;
    			}
    		}
    		
    		public AkPoint LastLowPoint
    		{
    			get
    			{
    				Update();
    				return lastLow;
    			}
    		}
    
    		public ArrayList Points
    		{
    			get { return this.points; }
    		}
    
    		public ArrayList LowPoints
    		{
    			get { return this.lowPoints; }
    		}
    
    		public ArrayList HighPoints
    		{
    			get { return this.highPoints; }
    		}
    Could you help me , please with that issue?

    #2
    Hello akushyn,

    Thank you for your note.

    Without the full code I'm unable to test on my end.

    The message you're getting suggests some of your indicators are not coded properly for serialization. Serialization is most commonly needed for user definable color inputs and allows these inputs to be saved in workspaces and chart templates. If these are your own custom coded indicators, a guide to serializing color inputs is available here:


    If you are unable to resolve the issue, please upload a copy of the full code so we can take a look on our end.

    To export a NinjaScript from NinjaTrader 7 do the following:
    From the Control Center window select File -> Utilities-> Export NinjaScript...
    Select the file in the left column then click “>”, then press export and name the file.
    Then attach that file you saved; under My Docs>NT8>Bin>Custom>Select the downloaded .zip file.


    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Its a private indicator. I could send you on email.
      Tell me your email, please.

      Comment


        #4
        Hello akushyn,

        Please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread as well as the files.

        I look forward to receiving your email.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_AlanP View Post
          Hello akushyn,

          Please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread as well as the files.

          I look forward to receiving your email.
          Check your inbox,plz

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Barry Milan, Today, 10:35 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by WeyldFalcon, 12-10-2020, 06:48 PM
          14 responses
          1,428 views
          0 likes
          Last Post Handclap0241  
          Started by DJ888, Yesterday, 06:09 PM
          2 responses
          9 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          40 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Today, 08:51 AM
          2 responses
          16 views
          0 likes
          Last Post bill2023  
          Working...
          X