I have an issue with an indicator where I cannot store it on a chart, because NT will not save the settings. In the past, I've realized I needed to serialize something NT could not handle, but this one is so simple and I am obviously blindly missing something.
I get this error
Could not save indicator ' :' There was an error generating the XML document.
I have tried 'reset' on the template, and it has then saved. But, change a few settings and I get back to this again, which means on NT restart, indicator is gone.
This is my settings code, and I think this is really the only place this can be the problem? Can you see any issue there? Anywhere else for me to check?
Thanks.
#region Properties
[NinjaScriptProperty]
[Display(Name = "resetOnEachBar", GroupName = "NinjaScriptParameters", Order = 0)]
public bool resetOnEachBar
{ get; set; }
[NinjaScriptProperty]
[Display(Name = "useTickSeries", GroupName = "NinjaScriptParameters", Order = 1)]
public bool useTickSeries
{ get; set; }
// [NinjaScriptProperty]
// [Range(0, int.MaxValue)]
// [Display(Name = "Minimum volume", GroupName = "NinjaScriptParameters", Order = 1)]
// public double minvol
// { get; set; }
[NinjaScriptProperty]
[Display(Name = "show all POCVOLs", GroupName = "NinjaScriptParameters", Order = 3)]
public bool showallpocs
{ get; set; }
[NinjaScriptProperty]
[Display(Name = "show text", GroupName = "NinjaScriptParameters", Order = 4)]
public bool showText
{ get; set; }
[NinjaScriptProperty]
[Display(Name = "VolMultiplier1", GroupName = "NinjaScriptParameters", Order = 5)]
public double VolMultiplier1
{ get; set; }
[NinjaScriptProperty]
[Display(Name = "VolMultiplier2", GroupName = "NinjaScriptParameters", Order = 6)]
public double VolMultiplier2
{ get; set; }
[NinjaScriptProperty]
[Display(Name = "VolMultiplier3", GroupName = "NinjaScriptParameters", Order = 7)]
public double VolMultiplier3
{ get; set; }
[NinjaScriptProperty]
[Display(Name = "Font Size", GroupName = "NinjaScriptParameters", Order = 8)]
public int fSize
{ get; set; }
[NinjaScriptProperty]
[Display(Name = "Enable Alerts", GroupName = "Alerts", Order = 0)]
public bool enableAlerts
{ get; set; }
[Range(0, 19)]
[Display(Name="shared_indicator_id", Order=1, GroupName="Algo", Description="UNIQUE amoungst instrument indicator id")]
public int shared_indicator_id
{ get; set; }
[Range(0, 19)]
[Display(Name="shared_instrument_id", Order=2, GroupName="Algo", Description="Instrument id")]
public int shared_instrument_id
{ get; set; }
[Browsable(false)]
[XmlIgnore]
public Series<double> PltPOC
{
get { return Values[0]; }
}
#endregion

Comment