• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Failed to save indicators 8.0.0.2 64-bit BETA

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

    Failed to save indicators 8.0.0.2 64-bit BETA

    I started from scratch, uninstalling 8.0.0.1 and then deleting 15,000? files from NT8 folder that were left behind.

    Re-set up indicators and code.

    Added my indicator to a chart, and created new workspace, and click save the workspace - I get this error.

    (This is probably why the indicator do not show back up on the chart).

    Time Category Message
    5/28/2015 7:39:14 PM Default Could not save indicator 'MyDrawRegionTest:' There was an error reflecting type 'NinjaTrader.NinjaScript.Indicators.MyDrawRegionTe st'.

    Upon restart the error is:

    Time Category Message
    5/28/2015 7:42:08 PM NinjaScript 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.


    This was also in 8.0.0.1 .. my indicator failed to restore (I didn't really mention it).

    None of the things are true (a,b, or c). I can re-add the indicator without issue to the chart.

    Any thoughts/ideas? Am I doing something wrong in the code?
    Attached Files
    Last edited by sledge; 05-28-2015, 05:51 PM. Reason: adjusted title

    #2
    This is a serialization issue. At the very least, add the XmlIgnore attribute to the public brush properties.

    Code:
    		[XmlIgnore]
    		[Display(Name="Zone_1_Color", Order=2, GroupName="Parameters")]
    		public Brush Zone_1_Color
    		{ get; set; }
    		
    		[XmlIgnore]
    		[Display(Name="Zone_1_Border", Order=3, GroupName="Parameters")]
    		public Brush Zone_1_Border
    		{ get; set; }
    Attached is a full example of your code which will correctly serialize user defined brushes.

    edit: Sorry forgot the second part of your issue in my first post: you also had a public data series, which cannot be serialized. The attached example also have XmlIgnore added to those public data series (or you can just set that to private if they do not need to be public)
    Attached Files
    Last edited by NinjaTrader_Matthew; 05-29-2015, 09:17 AM.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Since your Series are public as well these would need XMLIgnore. Anything that is public NT will try to serialize(Just like NT7) unless you add XMLIgnore attribute.

      NT7 example here for colors which we will update for NT8 Brushes. http://www.ninjatrader.com/support/f...ead.php?t=4977
      BrettNinjaTrader Product Management

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by RandanAL, Today, 05:13 PM
      0 responses
      5 views
      0 likes
      Last Post RandanAL  
      Started by timko, Today, 05:06 PM
      0 responses
      5 views
      0 likes
      Last Post timko
      by timko
       
      Started by ballboy11, Today, 01:04 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by Linda1507, Today, 01:22 PM
      2 responses
      15 views
      0 likes
      Last Post Linda1507  
      Started by ntbone, Today, 12:15 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X