Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator that are not plots​. An error generating the XML document.

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

    Indicator that are not plots​. An error generating the XML document.

    Hello Support,

    Exposing indicator values that are not plots​
    https://ninjatrader.com/support/help...ng_indicator_v alues_that.htm

    I have leverage the example to create two Series:
    private Series<int> myValue1Indication;
    private Series<int> myValue2Indication;


    Additionally, I have the properties like so:

    [Browsable(false)]
    [XmlIgnore]
    public Series<int> MyValue1Indication{
    get { return myValue1Indication; }
    }

    [Browsable(false)]
    [XmlIgnore]
    public Series<int> MyValue2Indication{
    get { return myValue2Indication; }
    }


    ​I load the indicator on the chart and it is working well. However, when I go to save a Chart Template, I'm getting this error:
    Could not save indicator 'Candle Body Momentum v03:' There was an error generating the XML document.

    Looking at the log, I'm only getting this:

    2022-09-13 20:51:12:274|3|16|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.
    2022-09-13 20:51:12:284|3|16|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.
    2022-09-13 22:36:09:147|3|4|Could not save indicator 'Indicator1:' There was an error generating the XML document.
    2022-09-13 22:36:09:148|3|4|Could not save indicator 'Indicator2:' There was an error generating the XML document.
    2022-09-13 22:36:54:177|3|4|Could not save indicator 'Indicator1:' There was an error generating the XML document.
    2022-09-13 22:36:54:181|3|4|Could not save indicator 'Indicator2:' There was an error generating the XML document.
    2022-09-13 22:42:36:951|3|4|Could not save indicator 'Indicator1:' There was an error generating the XML document.
    2022-09-13 22:58:43:753|3|4|Could not save indicator 'Indicator1:' There was an error generating the XML document.


    ​The restore errors are from the template loading. The save errors are from trying to save it again.

    I'm working on two custom indicators but only worried about one. Once I get that fixed, then I'm sure I can fix the other.

    I get the same errors when saving to a new template.

    Any ides on where to troubleshoot? I'd rather not post the code.

    Thanks,
    Matt


    #2
    Hello Matt,

    Thank you for your post.

    It appears that you have added the two series properly, including the XmlIgnore attribute in the properties. If you have made any changes to the indicator, you will need to be sure to compile it in the NinjaScript Editor first, then remove it and re-add it to your chart before trying to save a template. Additionally, if you have added a brush color as a user input you will need to make sure to serialize it in the properties. There is a description of this process here:



    If you are still encountering issues, please advise if you have any other declared variables or inputs so we may better assist you.

    Please let us know if we may be of further assistance.

    Comment


      #3
      Hello Emily,

      Thank you, that was the missing piece. Very much appreciated!

      Kind regards,
      Matt

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X