CS1503
<< Click to Display Table of Contents >> CS1503 |
The following CS1503 error code information is provided within the context of NinjaScript. The examples provided are only a subset of potential problems that this error code may reflect. In any case, the examples below provide a reference of coding flaw possibilities.
This error can occur when you try to assign a value to a Series<T> that is not of the correct value type.
Series<double> objects can only contain double values. Series<bool> objects can only contain bool values. Etc.
// Erroneous Sample Code - Cannot pass in a string to a Series<double>
Value[0] = "Close[0]";
// Resolution Sample Code - Sets Series<double> to the current bar's Close value
Value[0] = Close[0];
// Erroneous Sample Code - Cannot pass in a Series<double> object to a Series<double> Set() method
Values[0] = SMA(20);
// Resolution Sample Code - Sets Series<double> to the current bar's SMA(20) value
Values[0] = SMA(20)[0];