I am writing now one indicator and when I try to save it into template I get the next message:
"Indicator "Ninjatrader.Indicator...." could not be serialized. Please refer help for more information on serializing indicators.
I am using followed properties:
[Description("Bar span to consider for breakouts")]
[GridCategory("Parameters")]
public int Span {
get { return span; }
set { span = Math.Max(1, value); }
}
[Description("What to display (0=none, 1=dots, 2=lines, 3=both)")]
[GridCategory("Parameters")]
[Gui.Design.DisplayNameAttribute("Display Type")]
public int DisplayType {
get { return displayType; }
set { displayType = Math.Max(0, value); }
}
[Description("Display/Hide switch points")]
[GridCategory("Parameters")]
public bool DisplayDiamonds {
get { return displayDiamonds; }
set { displayDiamonds = value; }
}
public AkPoint FirstPoint
{
get { return patterns.P1; }
}
public AkPoint SecondPoint
{
get { return patterns.P2; }
}
public AkPoint CurrentPoint
{
get
{
Update();
return patterns.Current;
}
}
public AkDirrection Dirrection
{
get
{
Update();
return patterns.Dirrection;
}
}
public BoolSeries Switcher
{
get
{
return this.switcher;
}
}
public AkPoint LastHighPoint
{
get
{
Update();
return lastHigh;
}
}
public AkPoint LastLowPoint
{
get
{
Update();
return lastLow;
}
}
public ArrayList Points
{
get { return this.points; }
}
public ArrayList LowPoints
{
get { return this.lowPoints; }
}
public ArrayList HighPoints
{
get { return this.highPoints; }
}

Comment