Here are the NT8 code and the NT7 code below it.
// NT8 code that cases error CS0542 public class @Logic_DataVal { //// Input variables private @Logic_DataType dataType; // DataSeries private Series<double> longValues; private Series<double> shortValues; private int displacement; // (>=0) // Fix Value private double fixValue; // Price private @Logic_PriceType longPriceType; private @Logic_PriceType shortPriceType; private int lookback; // (>=1) // private Indicator parentClass; // @Logic_DataVal Constructor public @Logic_DataVal(Indicator parentClass) { this.parentClass = parentClass; } // DataSeries Setup public @Logic_DataVal Series<double>(Series<double> longValues, Series<double> shortValues) { return Series<double>(longValues, shortValues, 0); } public @Logic_DataVal Series<double>(Series<double> longValues, Series<double> shortValues, int displacement) { this.dataType = @Logic_DataType.DataSeries; // DataSeries this.longValues = longValues; this.shortValues = shortValues; this.displacement = displacement; // (>=0) // Fix Value this.fixValue = 0; // Price this.longPriceType = @Logic_PriceType.Close; this.shortPriceType = @Logic_PriceType.Close; this.lookback = 0; // (>=1) return this; } // Fix Value Setup public @Logic_DataVal FixValue(double fixValue) { this.dataType = @Logic_DataType.FixValue; // Fix Value this.fixValue = fixValue; // DataSeries this.longValues = null; this.shortValues = null; this.displacement = 0; // Price this.longPriceType = @Logic_PriceType.Close; this.shortPriceType = @Logic_PriceType.Close; this.lookback = 0; // (>=1) return this; } // Price Setup public @Logic_DataVal Price(@Logic_PriceType longPriceType, @Logic_PriceType shortPriceType, int lookback) { this.dataType = @Logic_DataType.Price; // Price this.longPriceType = longPriceType; this.shortPriceType = shortPriceType; this.lookback = lookback; // (>=1) // DataSeries this.longValues = null; this.shortValues = null; this.displacement = 0; // Fix Value this.fixValue = 0; return this; } ... } return value; } }
// NT7 code public class @Logic_DataVal { //// Input variables private @Logic_DataType dataType; // DataSeries private DataSeries longValues; private DataSeries shortValues; private int displacement; // (>=0) // Fix Value private double fixValue; // Price private @Logic_PriceType longPriceType; private @Logic_PriceType shortPriceType; private int lookback; // (>=1) // private Indicator parentClass; // @Logic_DataVal Constructor public @Logic_DataVal(Indicator parentClass) { this.parentClass = parentClass; } // DataSeries Setup public @Logic_DataVal DataSeries(DataSeries longValues, DataSeries shortValues) { return DataSeries(longValues, shortValues, 0); } public @Logic_DataVal DataSeries(DataSeries longValues, DataSeries shortValues, int displacement) { this.dataType = @Logic_DataType.DataSeries; // DataSeries this.longValues = longValues; this.shortValues = shortValues; this.displacement = displacement; // (>=0) // Fix Value this.fixValue = 0; // Price this.longPriceType = @Logic_PriceType.Close; this.shortPriceType = @Logic_PriceType.Close; this.lookback = 0; // (>=1) return this; } // Fix Value Setup public @Logic_DataVal FixValue(double fixValue) { this.dataType = @Logic_DataType.FixValue; // Fix Value this.fixValue = fixValue; // DataSeries this.longValues = null; this.shortValues = null; this.displacement = 0; // Price this.longPriceType = @Logic_PriceType.Close; this.shortPriceType = @Logic_PriceType.Close; this.lookback = 0; // (>=1) return this; } // Price Setup public @Logic_DataVal Price(@Logic_PriceType longPriceType, @Logic_PriceType shortPriceType, int lookback) { this.dataType = @Logic_DataType.Price; // Price this.longPriceType = longPriceType; this.shortPriceType = shortPriceType; this.lookback = lookback; // (>=1) // DataSeries this.longValues = null; this.shortValues = null; this.displacement = 0; // Fix Value this.fixValue = 0; return this; } // return the long Value public double GetLong() { return GetLong(0); } ... } return value; } }
Comment