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 bortz, 11-06-2023, 08:04 AM
      47 responses
      1,605 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      8 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      4 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      13 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X