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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Kaledus, Today, 01:29 PM
      0 responses
      3 views
      0 likes
      Last Post Kaledus
      by Kaledus
       
      Started by PaulMohn, Today, 12:36 PM
      1 response
      16 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by yertle, Yesterday, 08:38 AM
      8 responses
      37 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Started by rdtdale, Today, 01:02 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by alifarahani, Today, 09:40 AM
      3 responses
      19 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X