After compiling this code, the Color-caching remains in the generated code and leads to a syntax error.
/*
[Description("")]
[GridCategory("Parameters")]
public KnownColor Color
{
get { return color; }
set { color = value; }
}
*/
#endregion
}
}
#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
public partial class Indicator : IndicatorBase
{
private MyMTFSMA[] cacheMyMTFSMA = null;
private static MyMTFSMA checkMyMTFSMA = new MyMTFSMA();
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public MyMTFSMA MyMTFSMA(KnownColor color, int period)
{
return MyMTFSMA(Input, color, period);
}
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public MyMTFSMA MyMTFSMA(Data.IDataSeries input, KnownColor color, int period)
{
if (cacheMyMTFSMA != null)
for (int idx = 0; idx < cacheMyMTFSMA.Length; idx++)
if (cacheMyMTFSMA[idx].Color == color && cacheMyMTFSMA[idx].Period == period && cacheMyMTFSMA[idx].EqualsInput(input))
return cacheMyMTFSMA[idx];
... after removing the property code completely the code is compileable.

Comment